3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xmlstr = <<<XML <?xml version='1.0' standalone='yes'?> <movies> <movie> <title>PHP: Behind the Parser</title> <characters> <character> <name>Ms. Coder</name> <actor>Onlivia Actora</actor> </character> <character> <name>Mr. Coder</name> <actor>El Act&#211;r</actor> </character> </characters> <plot> So, this language. It's like, a programming language. Or is it a scripting language? All is revealed in this thrilling horror spoof of a documentary. </plot> <great-lines> <line>PHP solves all my web problems</line> </great-lines> <rating type="thumbs">7</rating> <rating type="stars">5</rating> </movie> </movies> XML; $parsed = simplexml_load_string($xml); $foo = $parsed->movies->movie->foo->bar->baz; var_dump($foo); ?>
Output for git.master, git.master_jit
Warning: Undefined variable $xml in /in/YPUBi on line 30 Deprecated: simplexml_load_string(): Passing null to parameter #1 ($data) of type string is deprecated in /in/YPUBi on line 30 Warning: Attempt to read property "movies" on bool in /in/YPUBi on line 32 Warning: Attempt to read property "movie" on null in /in/YPUBi on line 32 Warning: Attempt to read property "foo" on null in /in/YPUBi on line 32 Warning: Attempt to read property "bar" on null in /in/YPUBi on line 32 Warning: Attempt to read property "baz" on null in /in/YPUBi on line 32 NULL
Output for rfc.property-hooks
Warning: Undefined variable $xml in /in/YPUBi on line 30 Deprecated: simplexml_load_string(): Passing null to parameter #1 ($data) of type string is deprecated in /in/YPUBi on line 30 Warning: Attempt to read property "movies" on false in /in/YPUBi on line 32 Warning: Attempt to read property "movie" on null in /in/YPUBi on line 32 Warning: Attempt to read property "foo" on null in /in/YPUBi on line 32 Warning: Attempt to read property "bar" on null in /in/YPUBi on line 32 Warning: Attempt to read property "baz" on null in /in/YPUBi on line 32 NULL

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
45.91 ms | 402 KiB | 8 Q