3v4l.org

run code in 300+ PHP versions simultaneously
<?php class User { public $address; } class Address { public $street; } function old($key, $default) { var_dump($default); } $address = new Address(); $address->street = 'Street'; $user = new User(); $user->address = $address; old('address', $user->address ?? '');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/juW1I
function name:  (null)
number of ops:  18
compiled vars:  !0 = $address, !1 = $user
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   NEW                                              $2      'Address'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   18     3        ASSIGN_OBJ                                               !0, 'street'
          4        OP_DATA                                                  'Street'
   20     5        NEW                                              $6      'User'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $6
   21     8        ASSIGN_OBJ                                               !1, 'address'
          9        OP_DATA                                                  !0
   23    10        INIT_FCALL                                               'old'
         11        SEND_VAL                                                 'address'
         12        FETCH_OBJ_IS                                     ~10     !1, 'address'
         13        COALESCE                                         ~11     ~10
         14        QM_ASSIGN                                        ~11     ''
         15        SEND_VAL                                                 ~11
         16        DO_FCALL                                      0          
         17      > RETURN                                                   1

Function old:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/juW1I
function name:  old
number of ops:  6
compiled vars:  !0 = $key, !1 = $default
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   14     2        INIT_FCALL                                               'var_dump'
          3        SEND_VAR                                                 !1
          4        DO_ICALL                                                 
   15     5      > RETURN                                                   null

End of function old

Class User: [no user functions]
Class Address: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.12 ms | 1397 KiB | 16 Q