3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { protected $a; public function __construct($a) { $this->a=$a; } public function print_a() { echo $this->a."\n"; } }; class ExtendedTest extends Test { public function print_a() { echo "extended {$this->a}"; } }; $test=new Test("hallo"); $test->print_a(); $extendedTest=new ExtendedTest("hallo"); $extendedTest->print_a(); apc_store("test",$test); $test_s=apc_fetch("test"); $test_s->print_a();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DISbN
function name:  (null)
number of ops:  23
compiled vars:  !0 = $test, !1 = $extendedTest, !2 = $test_s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   NEW                                              $3      'Test'
          1        SEND_VAL_EX                                              'hallo'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $3
   22     4        INIT_METHOD_CALL                                         !0, 'print_a'
          5        DO_FCALL                                      0          
   24     6        NEW                                              $7      'ExtendedTest'
          7        SEND_VAL_EX                                              'hallo'
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !1, $7
   25    10        INIT_METHOD_CALL                                         !1, 'print_a'
         11        DO_FCALL                                      0          
   27    12        INIT_FCALL_BY_NAME                                       'apc_store'
         13        SEND_VAL_EX                                              'test'
         14        SEND_VAR_EX                                              !0
         15        DO_FCALL                                      0          
   29    16        INIT_FCALL_BY_NAME                                       'apc_fetch'
         17        SEND_VAL_EX                                              'test'
         18        DO_FCALL                                      0  $12     
         19        ASSIGN                                                   !2, $12
   30    20        INIT_METHOD_CALL                                         !2, 'print_a'
         21        DO_FCALL                                      0          
         22      > RETURN                                                   1

Class Test:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DISbN
function name:  __construct
number of ops:  4
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        ASSIGN_OBJ                                               'a'
          2        OP_DATA                                                  !0
    8     3      > RETURN                                                   null

End of function __construct

Function print_a:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DISbN
function name:  print_a
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   FETCH_OBJ_R                                      ~0      'a'
          1        CONCAT                                           ~1      ~0, '%0A'
          2        ECHO                                                     ~1
   12     3      > RETURN                                                   null

End of function print_a

End of class Test.

Class ExtendedTest:
Function print_a:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DISbN
function name:  print_a
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   NOP                                                      
          1        FETCH_OBJ_R                                      ~0      'a'
          2        FAST_CONCAT                                      ~1      'extended+', ~0
          3        ECHO                                                     ~1
   18     4      > RETURN                                                   null

End of function print_a

Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DISbN
function name:  __construct
number of ops:  4
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        ASSIGN_OBJ                                               'a'
          2        OP_DATA                                                  !0
    8     3      > RETURN                                                   null

End of function __construct

End of class ExtendedTest.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.67 ms | 1399 KiB | 13 Q