3v4l.org

run code in 300+ PHP versions simultaneously
<?php define('MY_CONST', false); function constantExpressionInDefault( int $a = MY_CONST ? 10 : NULL) {} function constantExpressionInDefaultWithRequiredAfter( int $a = MY_CONST ? 10 : NULL, $b) {}
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/26TbS
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'define'
          1        SEND_VAL                                                 'MY_CONST'
          2        SEND_VAL                                                 <false>
          3        DO_ICALL                                                 
    5     4      > RETURN                                                   1

Function constantexpressionindefault:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/26TbS
function name:  constantExpressionInDefault
number of ops:  2
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV_INIT                                        !0      <const ast>
          1      > RETURN                                                   null

End of function constantexpressionindefault

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

End of function constantexpressionindefaultwithrequiredafter

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
225.68 ms | 1010 KiB | 14 Q