3v4l.org

run code in 300+ PHP versions simultaneously
<?php class X {} function test(int $number = null):?X { return null; } echo test(); class Car { protected function startEngine($key = false){ if($key === true) { $runningEngine = true; } print_r($runningEngine); return $runningEngine; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EjqOB
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'test'
          1        DO_FCALL                                      0  $0      
          2        ECHO                                                     $0
   25     3      > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EjqOB
function name:  test
number of ops:  4
compiled vars:  !0 = $number
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV_INIT                                        !0      null
    5     1      > RETURN                                                   null
    6     2*       VERIFY_RETURN_TYPE                                       
          3*     > RETURN                                                   null

End of function test

Class X: [no user functions]
Class Car:
Function startengine:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 4
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
filename:       /in/EjqOB
function name:  startEngine
number of ops:  9
compiled vars:  !0 = $key, !1 = $runningEngine
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV_INIT                                        !0      <false>
   14     1        TYPE_CHECK                                    8          !0
          2      > JMPZ                                                     ~2, ->4
   16     3    >   ASSIGN                                                   !1, <true>
   20     4    >   INIT_FCALL                                               'print_r'
          5        SEND_VAR                                                 !1
          6        DO_ICALL                                                 
   21     7      > RETURN                                                   !1
   23     8*     > RETURN                                                   null

End of function startengine

End of class Car.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.58 ms | 1398 KiB | 16 Q