How to determine from the formula that there is a phenyl group present in the molecule?

Why is the organic compound $\ce{C6H5-CH=CH-CH2Cl}$ named 3-chloro-1-phenylprop-1-ene and not 9-chloronon-5,7-dien-1,3-yne even though there is no specification whatsoever that there is a phenyl group in the organic molecule?
$$\ce{C6H5-CH=CH-CH2Cl}$$
can also be written as
$$\ce{CH#C-C#C-CH=CH-CH=CH-CH2-Cl}$$
and the name for this organic compound would be 9-chloronon-5,7-dien-1,3-yne.
How do we surely know that there exists a phenyl group in the molecule?  

Also why is phenyl treated as a substituent and cannot be considered in the longest chain?




It's a matter of convention.


$\ce{C6H5}$ is conventionally used to represent phenyl because it is a common moiety. Your long, highly unsaturated, chain is also $\ce{C6H5}$, but it wouldn't conventionally be written like that without expansion, unless you're setting out to confuse someone.


 6

The first molecule is cinnamyl chloride and has the structure


[![enter image description here](https://i.stack.imgur.com/R3XaN.png)](https://i.stack.imgur.com/R3XaN.png)


where the phenyl group appears.


The reason why phenyl is described as a substitutent is that there is no naming rule which encompasses both aliphatic chains and rings. So chains and rings are considered separately and are substituent of each other. If the highest priority moiety is on a ring, the ring becomes the parent chain. If it is on a chain, like in your case, the chain becomes the parent hydride and the phenyl group is considered a substituent.


 1