3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = '<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 43363) --> <svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" id="body_svg" version="1.1" x="0px" y="0px" preserveAspectRatio="xMinYMin meet" viewBox="0 0 600 800" inkscape:version="0.48.4 r9939" width="100%" height="100%" sodipodi:docname="body_def.svg"> <metadata id="metadata3037"> <rdf:RDF> <cc:Work rdf:about=""> <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> <dc:title></dc:title> </cc:Work> </rdf:RDF> </metadata> <defs id="defs3035" /> <sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="1366" inkscape:window-height="746" id="namedview3033" showgrid="false" inkscape:zoom="2.795" inkscape:cx="401.80644" inkscape:cy="509.1414" inkscape:window-x="-8" inkscape:window-y="-8" inkscape:window-maximized="1" inkscape:current-layer="body_group_1" /> <g id="body_group_1"> <g id="g3014"> <path id="right_head" fill="none" stroke="#000000" stroke-linecap="round" d="M294.526,24.076c0,0-9.846-1.224-12.697,0.331 s-8.033,4.405-11.143,7.515s-12.697,9.846-14.251,15.806s2.332,20.729,2.332,20.729s-4.634-2.422-5.701,1.296 s2.073,10.365,2.851,16.065s2.851,10.365,5.701,11.919s2.85,1.555,2.85,1.555s1.296,14.77,3.369,17.361 c0.34,0.425,0.624,0.781,0.862,1.078c1.211,1.514,1.211,1.514,1.211,1.514s1.555,7.514,0.519,9.328s-1.555,5.442-19.693,15.029 c-8.827,4.267-9.045,4.375-16.358,5.577" /> <path id="left_waist" d="M 367.044,419.509 C 367.243,416.06 367.353,412.968 367.353,410.363 367.353,389.618 363.629,382.704 362.565,375.789 361.502,368.874 360.509,353.895 359.445,344.852 357.487,338.648 357.519,335.914 355.119,328.448 352.719,320.982 383.395,296.64727 383.395,291.63468 383.395,286.62209 360.969,273.129 364.694,258.767 367.956,246.184 368.077,231.654 368.056,228.25 368.053,227.769 368.047,227.51 368.047,227.51" inkscape:connector-curvature="0" style="fill:none;stroke:#000000;stroke-linecap:round" sodipodi:nodetypes="csccssccc" /> <path id="left_foot" fill="none" stroke="#000000" stroke-linecap="round" d="M298.299,429.969c0.197,9.981,0.697,31.654,1.5,42.101 c1.064,13.83,4.255,30.851,5.851,40.425s-1.064,14.36-1.596,24.999c-0.533,10.639-0.532,25-3.724,35.105 s9.574,33.511,9.042,38.299c-0.531,4.788-7.446,22.872-7.446,31.383s10.638,34.042,10.106,44.681s-2.66,21.809-2.66,29.255 s-1.596,18.085-4.787,22.873c-3.191,4.788,3.191,12.233,3.191,12.233s-2.659,12.234-1.596,15.958 c1.064,3.724,23.404,2.659,23.404,2.659l27.66-2.128c0,0,0-2.659-4.256-5.851c-4.255-3.191-7.446-2.66-7.446-2.66s0,0-3.724-4.787 s-9.574-11.17-11.702-18.616s10.106-42.554,13.298-56.384s9.043-35.104,9.043-48.935s-7.447-55.852-7.447-67.021 s6.915-45.746,11.17-63.299c3.722-15.349,9.477-56.729,10.862-80.75" /> <path id="joint0" fill="none" stroke="#000000" stroke-linecap="round" d="M298.142,423.819c0,0,0.093,2.916,0.157,6.149" /> <path id="right_chest" fill="none" stroke="#000000" stroke-linecap="round" d="M370.994,207.239c0,0-0.836,7.046-1.819,10.068 c-0.075,0.232-0.151,0.44-0.229,0.62c-0.103,0.241-0.207,0.43-0.311,0.555c-1.197,1.44-13.881,15.191-17.911,16.495 s-16.478,1.067-20.863,0.593s-10.432-8.772-11.854-9.839" /> <path id="left_chest" fill="none" stroke="#000000" stroke-linecap="round" d="M219.979,207.588c0.31,2.786,1.19,9.455,2.386,10.895 s13.88,15.191,17.911,16.495s16.477,1.067,20.863,0.593s10.432-8.772,11.854-9.839" /> <path id="joint1" fill="none" stroke="#000000" stroke-linecap="round" d="M367.629,219.523" /> </g> <path id="joint2" fill="none" stroke="#000000" stroke-linecap="round" d="M58.345,219.523" /> <path id="left_arm" d="M354.613,149.458c0,0,17.866-3.883,23.691-3.107 s27.186,7.379,31.847,7.379s18.254-2.719,23.691-1.165s23.303,5.438,23.303,5.438s1.166-6.603-0.776-17.089 s-4.272-31.459-9.321-42.333s-8.545-19.418-12.04-20.972s-7.769-2.719-10.875-2.719s-4.66,1.554-7.379,1.942 s-6.215-3.107-10.486-2.719s-10.098,3.107-11.263,1.165s-0.776-7.379-0.776-7.379s-1.942-2.719-1.942-4.272 s5.437-12.817,7.379-16.312s4.273-7.768,8.545-5.826s25.633,9.709,30.682,12.428s13.593,8.933,15.535,11.651 s8.156,19.419,13.205,26.021s18.643,31.071,20.973,36.508s11.65,29.128,13.593,34.177s6.604,14.759,5.826,19.031 s-12.816,11.263-19.419,13.981s-29.517,10.098-36.119,11.263s-31.849,1.942-37.285,1.165s-12.428-4.661-17.865-4.661 s-11.65-2.33-16.312,5.438s-12.865,18.29-12.988,19.227" stroke-linecap="round" stroke="#000000" fill="none" /> <path id="right_arm" d="M235.703,149.179c-3.462,0.157-17.46-3.604-23.285-2.828 s-27.186,7.379-31.847,7.379s-18.254-2.719-23.691-1.165s-23.303,5.438-23.303,5.438s-1.166-6.603,0.776-17.089 s4.272-31.459,9.321-42.333s8.545-19.418,12.04-20.972s7.769-2.719,10.875-2.719s4.66,1.554,7.379,1.942s6.215-3.107,10.486-2.719 s10.098,3.107,11.263,1.165s0.776-7.379,0.776-7.379s1.942-2.719,1.942-4.272S193,50.809,191.058,47.314s-4.273-7.768-8.545-5.826 s-25.633,9.709-30.682,12.428s-13.593,8.933-15.535,11.651s-8.156,19.419-13.205,26.021s-18.643,31.071-20.973,36.508 s-11.65,29.128-13.593,34.177s-6.604,14.759-5.826,19.031s12.816,11.263,19.419,13.981s29.517,10.098,36.119,11.263 s31.849,1.942,37.285,1.165s12.428-4.661,17.865-4.661s11.65-2.33,16.312,5.438s10.875,17.089,13.205,20.196" stroke-linecap="round" stroke="#000000" fill="none" /> <g id="g3026"> <path id="left_head" fill="none" stroke="#000000" stroke-linecap="round" d="M295.093,24.076c0,0,10.904-0.833,13.755,0.721 s8.033,4.405,11.143,7.515s12.696,9.846,14.251,15.806s-2.332,20.729-2.332,20.729s4.635-2.422,5.701,1.296 s-2.073,10.365-2.851,16.065s-2.851,10.365-5.701,11.919c-2.85,1.555-2.85,1.555-2.85,1.555s-1.296,14.77-3.369,17.361 c-0.34,0.425-0.624,0.781-0.861,1.078c-1.211,1.514-1.211,1.514-1.211,1.514s-1.556,7.514-0.519,9.328 c1.036,1.814,1.555,5.442,19.693,15.029c8.826,4.267,9.045,4.375,16.358,5.577" /> <path id="right_waist" d="M 223.633,419.899 C 223.434,416.45 223.324,413.358 223.324,410.753 223.324,390.008 227.048,383.094 228.112,376.179 229.175,369.264 230.168,354.285 231.232,345.242 233.19,339.038 233.158,336.304 235.558,328.838 237.958,321.372 207.282,297.25991 207.282,292.24732 207.282,287.23473 229.708,273.519 225.983,259.157 222.721,246.574 224.4,231.543 222.621,228.64 222.005,227.635 222.63,227.9 222.63,227.9" inkscape:connector-curvature="0" style="fill:none;stroke:#000000;stroke-linecap:round" sodipodi:nodetypes="csccssccc" /> <path id="right_foot" fill="none" stroke="#000000" stroke-linecap="round" d="M292.378,430.359c-0.197,9.981-0.697,31.654-1.5,42.101 c-1.064,13.83-4.255,30.851-5.851,40.425s1.064,14.36,1.596,24.999c0.533,10.639,0.532,25,3.724,35.105 s-9.574,33.511-9.042,38.299c0.531,4.788,7.446,22.872,7.446,31.383s-10.638,34.042-10.106,44.681s2.66,21.809,2.66,29.255 s1.596,18.085,4.787,22.873c3.191,4.788-3.191,12.233-3.191,12.233s2.659,12.234,1.596,15.958 c-1.064,3.724-23.404,2.659-23.404,2.659l-27.66-2.128c0,0,0-2.659,4.256-5.851c4.255-3.191,7.446-2.66,7.446-2.66 s0,0,3.724-4.787s9.574-11.17,11.702-18.616s-10.106-42.554-13.298-56.384s-9.043-35.104-9.043-48.935s7.447-55.852,7.447-67.021 s-6.915-45.746-11.17-63.299c-3.722-15.349-9.477-56.729-10.862-80.75" /> <path id="joint3" fill="none" stroke="#000000" stroke-linecap="round" d="M292.602,423.652c0,0-0.16,3.474-0.224,6.707" /> </g> <path id="groin" fill="none" stroke="#000000" stroke-linecap="round" d="M274.659,407.485c0,0,11.642,14.137,16.216,15.384 s8.315,0.416,8.315,0.416l15.384-14.553" /> </g> </svg> '; $xml = simplexml_load_string( $xml); foreach( $xml->xpath( './/path') as $child) { echo $child->attributes()['name'] . "\n"; }
Output for 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.25, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29
Parse error: syntax error, unexpected '[', expecting ',' or ';' in /in/hWACQ on line 162
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected '[', expecting ',' or ';' in /in/hWACQ on line 162
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `','' or `';'' in /in/hWACQ on line 162
Process exited with code 255.

preferences:
282.96 ms | 401 KiB | 366 Q