3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml_string = <<<EOF <?xml version="1.0"?> <property> <landDetails> <area unit="squareMeter"/> </landDetails> <buildingDetails> <area unit="squareMeter">100</area> </buildingDetails> </property> EOF; $xml = simplexml_load_string($xml_string); $json = json_encode($xml); $array = json_decode($json,TRUE); var_dump($array);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Yc8BH
function name:  (null)
number of ops:  18
compiled vars:  !0 = $xml_string, !1 = $xml, !2 = $json, !3 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3C%3Fxml+version%3D%221.0%22%3F%3E%0A%3Cproperty%3E%0A++++%3ClandDetails%3E%0A++++++++%3Carea+unit%3D%22squareMeter%22%2F%3E%0A++++%3C%2FlandDetails%3E%0A++++%3CbuildingDetails%3E%0A++++++++%3Carea+unit%3D%22squareMeter%22%3E100%3C%2Farea%3E%0A++++%3C%2FbuildingDetails%3E%0A%3C%2Fproperty%3E'
   15     1        INIT_FCALL                                               'simplexml_load_string'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $5      
          4        ASSIGN                                                   !1, $5
   16     5        INIT_FCALL                                               'json_encode'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                         $7      
          8        ASSIGN                                                   !2, $7
   17     9        INIT_FCALL                                               'json_decode'
         10        SEND_VAR                                                 !2
         11        SEND_VAL                                                 <true>
         12        DO_ICALL                                         $9      
         13        ASSIGN                                                   !3, $9
   19    14        INIT_FCALL                                               'var_dump'
         15        SEND_VAR                                                 !3
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.17 ms | 1395 KiB | 21 Q