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"]'); $time_layout = $data[0]->xpath('time-layout[@time-coordinate="local"]'); $start_valid_time = $time_layout[0]->xpath('start-valid-time[@period-name="current"]'); echo (string)$start_valid_time[0];
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sbPLq
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%22current+observations%22%5D'
          7        DO_FCALL                                      0  $8      
          8        ASSIGN                                                   !2, $8
   13     9        FETCH_DIM_R                                      ~10     !2, 0
         10        INIT_METHOD_CALL                                         ~10, 'xpath'
         11        SEND_VAL_EX                                              'time-layout%5B%40time-coordinate%3D%22local%22%5D'
         12        DO_FCALL                                      0  $11     
         13        ASSIGN                                                   !3, $11
   14    14        FETCH_DIM_R                                      ~13     !3, 0
         15        INIT_METHOD_CALL                                         ~13, 'xpath'
         16        SEND_VAL_EX                                              'start-valid-time%5B%40period-name%3D%22current%22%5D'
         17        DO_FCALL                                      0  $14     
         18        ASSIGN                                                   !4, $14
   15    19        FETCH_DIM_R                                      ~16     !4, 0
         20        CAST                                          6  ~17     ~16
         21        ECHO                                                     ~17
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
179.1 ms | 1395 KiB | 15 Q