3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test($a,$b,$version="none"){ var_dump($version); $output=array(); if($version==="none"){ $output["status"]="error"; $output["reason"]="Version missing"; print_r ($output); } echo PHP_EOL."test".PHP_EOL; } function testtwo($a,$b,$version="none"){ $output=array(); if(!is_int($version)){ $output["status"]="error"; $output["reason"]="Version missing"; print_r ($output); } echo "\n"."testtwo"."\n"; } $a = 0; $b = 0; $c = 0; test($a,$b); test($a,$b,$c); //testtwo($a,$b); //testtwo($a,$b,$c);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PPXtX
function name:  (null)
number of ops:  13
compiled vars:  !0 = $a, !1 = $b, !2 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   ASSIGN                                                   !0, 0
   25     1        ASSIGN                                                   !1, 0
   26     2        ASSIGN                                                   !2, 0
   28     3        INIT_FCALL                                               'test'
          4        SEND_VAR                                                 !0
          5        SEND_VAR                                                 !1
          6        DO_FCALL                                      0          
   29     7        INIT_FCALL                                               'test'
          8        SEND_VAR                                                 !0
          9        SEND_VAR                                                 !1
         10        SEND_VAR                                                 !2
         11        DO_FCALL                                      0          
   32    12      > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 16
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/PPXtX
function name:  test
number of ops:  18
compiled vars:  !0 = $a, !1 = $b, !2 = $version, !3 = $output
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV_INIT                                        !2      'none'
    4     3        INIT_FCALL                                               'var_dump'
          4        SEND_VAR                                                 !2
          5        DO_ICALL                                                 
    5     6        ASSIGN                                                   !3, <array>
    6     7        IS_IDENTICAL                                             !2, 'none'
          8      > JMPZ                                                     ~6, ->16
    7     9    >   ASSIGN_DIM                                               !3, 'status'
         10        OP_DATA                                                  'error'
    8    11        ASSIGN_DIM                                               !3, 'reason'
         12        OP_DATA                                                  'Version+missing'
    9    13        INIT_FCALL                                               'print_r'
         14        SEND_VAR                                                 !3
         15        DO_ICALL                                                 
   11    16    >   ECHO                                                     '%0Atest%0A'
   12    17      > RETURN                                                   null

End of function test

Function testtwo:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 14
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/PPXtX
function name:  testtwo
number of ops:  16
compiled vars:  !0 = $a, !1 = $b, !2 = $version, !3 = $output
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV_INIT                                        !2      'none'
   15     3        ASSIGN                                                   !3, <array>
   16     4        TYPE_CHECK                                   16  ~5      !2
          5        BOOL_NOT                                         ~6      ~5
          6      > JMPZ                                                     ~6, ->14
   17     7    >   ASSIGN_DIM                                               !3, 'status'
          8        OP_DATA                                                  'error'
   18     9        ASSIGN_DIM                                               !3, 'reason'
         10        OP_DATA                                                  'Version+missing'
   19    11        INIT_FCALL                                               'print_r'
         12        SEND_VAR                                                 !3
         13        DO_ICALL                                                 
   21    14    >   ECHO                                                     '%0Atesttwo%0A'
   22    15      > RETURN                                                   null

End of function testtwo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.9 ms | 1403 KiB | 19 Q