3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = <<<XML <?xml version="1.0"?> <a> <b>Some String</b> </a> XML; $b = simplexml_load_string($xml)->xpath('/a/b'); var_dump((string)$b[0]); var_dump((bool)$b[0]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gRAGf
function name:  (null)
number of ops:  19
compiled vars:  !0 = $xml, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3C%3Fxml+version%3D%221.0%22%3F%3E%0A%3Ca%3E%0A++++%3Cb%3ESome+String%3C%2Fb%3E%0A%3C%2Fa%3E'
   10     1        INIT_FCALL                                               'simplexml_load_string'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $3      
          4        INIT_METHOD_CALL                                         $3, 'xpath'
          5        SEND_VAL_EX                                              '%2Fa%2Fb'
          6        DO_FCALL                                      0  $4      
          7        ASSIGN                                                   !1, $4
   11     8        INIT_FCALL                                               'var_dump'
          9        FETCH_DIM_R                                      ~6      !1, 0
         10        CAST                                          6  ~7      ~6
         11        SEND_VAL                                                 ~7
         12        DO_ICALL                                                 
   12    13        INIT_FCALL                                               'var_dump'
         14        FETCH_DIM_R                                      ~9      !1, 0
         15        BOOL                                             ~10     ~9
         16        SEND_VAL                                                 ~10
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.75 ms | 1395 KiB | 17 Q