3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public $value = 2; public function __construct() { $this->value = 3; } public static function outputTimesFive() { echo self::$value * 5; } } $a = new Test(); print_r($a); echo Test::outputTimesFive();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KBZjn
function name:  (null)
number of ops:  10
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   NEW                                              $1      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   20     3        INIT_FCALL                                               'print_r'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                                 
   21     6        INIT_STATIC_METHOD_CALL                                  'Test', 'outputTimesFive'
          7        DO_FCALL                                      0  $5      
          8        ECHO                                                     $5
          9      > RETURN                                                   1

Class Test:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KBZjn
function name:  __construct
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   ASSIGN_OBJ                                               'value'
          1        OP_DATA                                                  3
   11     2      > RETURN                                                   null

End of function __construct

Function outputtimesfive:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KBZjn
function name:  outputTimesFive
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   FETCH_STATIC_PROP_R          unknown             ~0      'value'
          1        MUL                                              ~1      ~0, 5
          2        ECHO                                                     ~1
   16     3      > RETURN                                                   null

End of function outputtimesfive

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.74 ms | 1387 KiB | 15 Q