3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function test() { static $i = 0; echo ($i++) . "\n"; } } $a = new Foo; $b = new Foo; echo $a->keese; trigger_error('Foo'); $a->test(); $b->test(); $a->test(); $b->test();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QQhlP
function name:  (null)
number of ops:  20
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   NEW                                              $2      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   13     3        NEW                                              $5      'Foo'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $5
   15     6        FETCH_OBJ_R                                      ~8      !0, 'keese'
          7        ECHO                                                     ~8
   17     8        INIT_FCALL                                               'trigger_error'
          9        SEND_VAL                                                 'Foo'
         10        DO_ICALL                                                 
   19    11        INIT_METHOD_CALL                                         !0, 'test'
         12        DO_FCALL                                      0          
   20    13        INIT_METHOD_CALL                                         !1, 'test'
         14        DO_FCALL                                      0          
   21    15        INIT_METHOD_CALL                                         !0, 'test'
         16        DO_FCALL                                      0          
   22    17        INIT_METHOD_CALL                                         !1, 'test'
         18        DO_FCALL                                      0          
         19      > RETURN                                                   1

Class Foo:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QQhlP
function name:  test
number of ops:  5
compiled vars:  !0 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   BIND_STATIC                                              !0
    8     1        POST_INC                                         ~1      !0
          2        CONCAT                                           ~2      ~1, '%0A'
          3        ECHO                                                     ~2
    9     4      > RETURN                                                   null

End of function test

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.53 ms | 1395 KiB | 15 Q