3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public static $person; public function sayHello() { self::$person += 1; echo 'Hello'; } public function getNumber(){ return self::$person; } } $foo1 = new Foo(); $foo1->sayHello(); $foo2 = new Foo(); $foo2->sayHello(); $foo1->getNumber(); $foo2->getNumber();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UdpqN
function name:  (null)
number of ops:  15
compiled vars:  !0 = $foo1, !1 = $foo2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   NEW                                              $2      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   26     3        INIT_METHOD_CALL                                         !0, 'sayHello'
          4        DO_FCALL                                      0          
   29     5        NEW                                              $6      'Foo'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $6
   31     8        INIT_METHOD_CALL                                         !1, 'sayHello'
          9        DO_FCALL                                      0          
   33    10        INIT_METHOD_CALL                                         !0, 'getNumber'
         11        DO_FCALL                                      0          
   35    12        INIT_METHOD_CALL                                         !1, 'getNumber'
         13        DO_FCALL                                      0          
         14      > RETURN                                                   1

Class Foo:
Function sayhello:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UdpqN
function name:  sayHello
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   ASSIGN_STATIC_PROP_OP                         1          'person'
          1        OP_DATA                                                  1
   11     2        ECHO                                                     'Hello'
   12     3      > RETURN                                                   null

End of function sayhello

Function getnumber:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UdpqN
function name:  getNumber
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   FETCH_STATIC_PROP_R          unknown             ~0      'person'
          1      > RETURN                                                   ~0
   18     2*     > RETURN                                                   null

End of function getnumber

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.2 ms | 1394 KiB | 13 Q