3v4l.org

run code in 300+ PHP versions simultaneously
<?php function retour1($parametre="OK") { return $parametre; } function retour2($parametre=NULL) { if (!$parametre) { $parametre="OK"; } return $parametre; } echo retour1(); echo retour2();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kTCIN
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'retour1'
          1        DO_FCALL                                      0  $0      
          2        ECHO                                                     $0
    8     3        INIT_FCALL                                               'retour2'
          4        DO_FCALL                                      0  $1      
          5        ECHO                                                     $1
          6      > RETURN                                                   1

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

End of function retour1

Function retour2:
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/kTCIN
function name:  retour2
number of ops:  6
compiled vars:  !0 = $parametre
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV_INIT                                        !0      null
          1        BOOL_NOT                                         ~1      !0
          2      > JMPZ                                                     ~1, ->4
          3    >   ASSIGN                                                   !0, 'OK'
          4    > > RETURN                                                   !0
          5*     > RETURN                                                   null

End of function retour2

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.92 ms | 1398 KiB | 15 Q