php 5.3 - PHP Fatal error: Can't use method return value in write context -


this question has answer here:

if (isset( $xml->xpath('/lfm/artist/image[@size="extralarge"]')[0])) { 

php version 5.3 in use (was 5.7 until server dude switched 5.3).

on line @ top we're getting error:

php fatal error:  can't use method return value in write context 

i've read few articles nothing obvious springs mind - might case of not seeing wood through trees.

any advice on how rid of error other switching 5.7?

for compatibility php < 5.4, update code follows:

$elements = $xml->xpath('/lfm/artist/image[@size="extralarge"]'); if (isset($elements[0])) { 

take @ https://wiki.php.net/rfc/functionarraydereferencing if you're interested in learning more.


Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -