3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = new class extends \DOMDocument { private $foo; public function getFoo() { if ($this->foo !== null) { print "woohoo"; } } }; var_dump($a->getFoo());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/18JH7
function name:  (null)
number of ops:  10
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_ANON_CLASS                               <unknown> 'domdocument'
          1        NEW                                              $2      $1
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
   13     4        INIT_FCALL                                               'var_dump'
          5        INIT_METHOD_CALL                                         !0, 'getFoo'
          6        DO_FCALL                                      0  $5      
          7        SEND_VAR                                                 $5
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Class DOMDocument@anonymous:
Function getfoo:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 4
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
filename:       /in/18JH7
function name:  getFoo
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   FETCH_OBJ_R                                      ~0      'foo'
          1        TYPE_CHECK                                  1020          ~0
          2      > JMPZ                                                     ~1, ->4
    8     3    >   ECHO                                                     'woohoo'
   10     4    > > RETURN                                                   null

End of function getfoo

End of class DOMDocument@anonymous.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.48 ms | 1395 KiB | 15 Q