3v4l.org

run code in 300+ PHP versions simultaneously
<?php const ONE = 1; const TWO = ONE * 2; class C { const THREE = TWO + 1; private $six = self::THREE * (ONE + ONE); public function f($a = ONE + self::THREE) { return $a + $this->six; // 10 } } echo (new C)->f()."\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hV7Gs
function name:  (null)
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CONST                                            'ONE', 1
    4     1        DECLARE_CONST                                            'TWO', <const ast>
   16     2        NEW                                              $0      'C'
          3        DO_FCALL                                      0          
          4        INIT_METHOD_CALL                                         $0, 'f'
          5        DO_FCALL                                      0  $2      
          6        CONCAT                                           ~3      $2, '%0A'
          7        ECHO                                                     ~3
          8      > RETURN                                                   1

Class C:
Function f:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hV7Gs
function name:  f
number of ops:  5
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV_INIT                                        !0      <const ast>
   12     1        FETCH_OBJ_R                                      ~1      'six'
          2        ADD                                              ~2      !0, ~1
          3      > RETURN                                                   ~2
   13     4*     > RETURN                                                   null

End of function f

End of class C.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.31 ms | 1393 KiB | 13 Q