3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Device { public function getDeviceModel() { return new DeviceModel(); } } class DeviceModel { public function getResetManualAllowed(){ return true; } } $device = new Device(); if($device?->getDeviceModel()->getResetManualAllowed()) { return "allowed"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 10
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1cUGt
function name:  (null)
number of ops:  11
compiled vars:  !0 = $device
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $1      'Device'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   17     3        JMP_NULL                                         $5      !0
          4        INIT_METHOD_CALL                                         !0, 'getDeviceModel'
          5        DO_FCALL                                      0  $4      
          6        INIT_METHOD_CALL                                         $4, 'getResetManualAllowed'
          7        DO_FCALL                                      0  $5      
          8      > JMPZ                                                     $5, ->10
   18     9    > > RETURN                                                   'allowed'
   19    10    > > RETURN                                                   1

Class Device:
Function getdevicemodel:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1cUGt
function name:  getDeviceModel
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   NEW                                              $0      'DeviceModel'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   $0
    6     3*     > RETURN                                                   null

End of function getdevicemodel

End of class Device.

Class DeviceModel:
Function getresetmanualallowed:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1cUGt
function name:  getResetManualAllowed
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E > > RETURN                                                   <true>
   12     1*     > RETURN                                                   null

End of function getresetmanualallowed

End of class DeviceModel.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
13.71 ms | 411 KiB | 7 Q