3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); function optional(?string $string) { } function not_optional(string $string = null) { } optional(null); not_optional();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/POhdI
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_FCALL                                               'optional'
          1        SEND_VAL                                                 null
          2        DO_FCALL                                      0          
   14     3        INIT_FCALL                                               'not_optional'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

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

End of function optional

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

End of function not_optional

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.22 ms | 1401 KiB | 15 Q