3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xmlstr = <<<XML <?xml version="1.0" encoding="utf-8"?> <evaluation test="BDI II"> <scales> <scale id="_p" order="0" name="Gesamt" agg="sum" range="*"> <range lo="0" hi="8" mark="limit">keine Depression</range> <range lo="9" hi="13" mark="limit">minimale Depression</range> <range lo="14" hi="19" mark="limit">leichte Depression</range> <range lo="20" hi="28" mark="limit">mittelschwere Depression</range> <range lo="29" hi="63" mark="limit">schwere Depression</range> </scale> </scales> </evaluation> XML; $xml=simplexml_load_string($xmlstr); echo ($xml->scales->scale->range->Count());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uiiXl
function name:  (null)
number of ops:  12
compiled vars:  !0 = $xmlstr, !1 = $xml
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3C%3Fxml+version%3D%221.0%22+encoding%3D%22utf-8%22%3F%3E%0A%3Cevaluation+test%3D%22BDI+II%22%3E%0A%09%3Cscales%3E%0A%09%09%3Cscale+id%3D%22_p%22+order%3D%220%22+name%3D%22Gesamt%22+agg%3D%22sum%22+range%3D%22%2A%22%3E%0A%09%09%09%3Crange+lo%3D%220%22+hi%3D%228%22+mark%3D%22limit%22%3Ekeine+Depression%3C%2Frange%3E%0A%09%09%09%3Crange+lo%3D%229%22+hi%3D%2213%22+mark%3D%22limit%22%3Eminimale+Depression%3C%2Frange%3E%0A%09%09%09%3Crange+lo%3D%2214%22+hi%3D%2219%22+mark%3D%22limit%22%3Eleichte+Depression%3C%2Frange%3E%0A%09%09%09%3Crange+lo%3D%2220%22+hi%3D%2228%22+mark%3D%22limit%22%3Emittelschwere+Depression%3C%2Frange%3E%0A%09%09%09%3Crange+lo%3D%2229%22+hi%3D%2263%22+mark%3D%22limit%22%3Eschwere+Depression%3C%2Frange%3E%0A%09%09%3C%2Fscale%3E%0A%09%3C%2Fscales%3E%0A%3C%2Fevaluation%3E'
   16     1        INIT_FCALL                                               'simplexml_load_string'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $3      
          4        ASSIGN                                                   !1, $3
   17     5        FETCH_OBJ_R                                      ~5      !1, 'scales'
          6        FETCH_OBJ_R                                      ~6      ~5, 'scale'
          7        FETCH_OBJ_R                                      ~7      ~6, 'range'
          8        INIT_METHOD_CALL                                         ~7, 'Count'
          9        DO_FCALL                                      0  $8      
         10        ECHO                                                     $8
         11      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.88 ms | 1395 KiB | 15 Q