3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = <<<XML <data type="current observations"> <time-layout time-coordinate="local"> <start-valid-time period-name="current">2013-05-27T13:53:00-04:00</start-valid-time> </time-layout> </data> XML; $weather = simplexml_load_string($x); $data = $weather->xpath("/data[@type='current observations']")[0]; $time_layout = $data->xpath("time-layout[@time-coordinate='local']")[0]; $start_valid_time = $time_layout->xpath("start-valid-time[@period-name='current']")[0]; echo (string)$start_valid_time;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WOGhr
function name:  (null)
number of ops:  23
compiled vars:  !0 = $x, !1 = $weather, !2 = $data, !3 = $time_layout, !4 = $start_valid_time
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3Cdata+type%3D%22current+observations%22%3E%0A++++%3Ctime-layout+time-coordinate%3D%22local%22%3E%0A++++++++%3Cstart-valid-time+period-name%3D%22current%22%3E2013-05-27T13%3A53%3A00-04%3A00%3C%2Fstart-valid-time%3E%0A++++%3C%2Ftime-layout%3E%0A%3C%2Fdata%3E'
   10     1        INIT_FCALL                                               'simplexml_load_string'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $6      
          4        ASSIGN                                                   !1, $6
   12     5        INIT_METHOD_CALL                                         !1, 'xpath'
          6        SEND_VAL_EX                                              '%2Fdata%5B%40type%3D%27current+observations%27%5D'
          7        DO_FCALL                                      0  $8      
          8        FETCH_DIM_R                                      ~9      $8, 0
          9        ASSIGN                                                   !2, ~9
   13    10        INIT_METHOD_CALL                                         !2, 'xpath'
         11        SEND_VAL_EX                                              'time-layout%5B%40time-coordinate%3D%27local%27%5D'
         12        DO_FCALL                                      0  $11     
         13        FETCH_DIM_R                                      ~12     $11, 0
         14        ASSIGN                                                   !3, ~12
   14    15        INIT_METHOD_CALL                                         !3, 'xpath'
         16        SEND_VAL_EX                                              'start-valid-time%5B%40period-name%3D%27current%27%5D'
         17        DO_FCALL                                      0  $14     
         18        FETCH_DIM_R                                      ~15     $14, 0
         19        ASSIGN                                                   !4, ~15
   15    20        CAST                                          6  ~17     !4
         21        ECHO                                                     ~17
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.32 ms | 1395 KiB | 15 Q