3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array ( '@attributes' => array ( 'recordReturn' => '2', ), 'Address' => array ( 0 => array ( 'adr_type' => 'Business', 'adr_address1' => 'addresse1', 'adr_address2' => 'addresse2', 'adr_address3' => 'addresse3', 'adr_city' => 'aaa', 'adr_state' => 'IA', 'adr_post_code' => '50312', 'adr_country' => 'UNITED STATES', ), 1 => array ( 'adr_type' => 'Home', 'adr_address1' => 'addresse1', 'adr_address2' => 'addresse2', 'adr_address3' => 'addresse3', 'adr_city' => 'bbb', 'adr_state' => 'IA', 'adr_post_code' => '50312', 'adr_country' => 'UNITED STATES', ) ) ); print_r($arr->attributes());
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.16 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.34, 8.2.0 - 8.2.30, 8.3.0 - 8.3.30, 8.4.1 - 8.4.18, 8.5.0 - 8.5.3
Fatal error: Uncaught Error: Call to a member function attributes() on array in /in/16LTl:35 Stack trace: #0 {main} thrown in /in/16LTl on line 35
Process exited with code 255.
Output for 5.6.0 - 5.6.30
Fatal error: Call to a member function attributes() on array in /in/16LTl on line 35
Process exited with code 255.
Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38
Fatal error: Call to a member function attributes() on a non-object in /in/16LTl on line 35
Process exited with code 255.
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.9
Fatal error: Call to a member function on a non-object in /in/16LTl on line 35
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to a member function on a non-object in /in/16LTl on line 35

preferences:
117.89 ms | 2327 KiB | 5 Q