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 retour1("OK"); echo retour2(); echo retour2("OK");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BSC2K
function name:  (null)
number of ops:  15
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                                               'retour1'
          4        SEND_VAL                                                 'OK'
          5        DO_FCALL                                      0  $1      
          6        ECHO                                                     $1
   10     7        INIT_FCALL                                               'retour2'
          8        DO_FCALL                                      0  $2      
          9        ECHO                                                     $2
   12    10        INIT_FCALL                                               'retour2'
         11        SEND_VAL                                                 'OK'
         12        DO_FCALL                                      0  $3      
         13        ECHO                                                     $3
         14      > RETURN                                                   1

Function retour1:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BSC2K
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/BSC2K
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:
163.98 ms | 1403 KiB | 17 Q