3v4l.org

run code in 500+ PHP versions simultaneously
<?php $doc = new DomDocument; $doc->loadHTML('<body> <script id="something" type="application/json"> { "a": { "b": "c" }, "d": { "e": "f" } } </script> </body>'); $something = $doc->getElementById('something'); var_dump($something->textContent);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/v69BD
function name:  (null)
number of ops:  15
compiled vars:  !0 = $doc, !1 = $something
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   NEW                                                  $2      'DomDocument'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $2
    4     3        INIT_METHOD_CALL                                             !0, 'loadHTML'
          4        SEND_VAL_EX                                                  '%3Cbody%3E%0A++++%3Cscript+id%3D%22something%22+type%3D%22application%2Fjson%22%3E%0A++++%7B%0A++++++++%22a%22%3A+%7B%0A++++++++++++%22b%22%3A+%22c%22%0A++++++++%7D%2C%0A++++++++%22d%22%3A+%7B%0A++++++++++++%22e%22%3A+%22f%22%0A++++++++%7D%0A++++%7D%0A++++%3C%2Fscript%3E%0A%3C%2Fbody%3E'
          5        DO_FCALL                                          0          
   17     6        INIT_METHOD_CALL                                             !0, 'getElementById'
          7        SEND_VAL_EX                                                  'something'
          8        DO_FCALL                                          0  $6      
          9        ASSIGN                                                       !1, $6
   19    10        INIT_FCALL                                                   'var_dump'
         11        FETCH_OBJ_R                                          ~8      !1, 'textContent'
         12        SEND_VAL                                                     ~8
         13        DO_ICALL                                                     
         14      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
137.33 ms | 2044 KiB | 14 Q