3v4l.org

run code in 500+ PHP versions simultaneously
<?php // usleep()/sleep() with large values are left out: they really sleep on versions that accept them $cases = [ 'array_filter mode 3' => fn () => array_filter([1], null, 3), 'array_change_key_case 2' => fn () => array_change_key_case(['a' => 1], 2), 'pathinfo 3' => fn () => pathinfo('/a/b.c', 3), 'pathinfo 64' => fn () => pathinfo('/a/b.c', 64), 'number_format decimals PHP_INT_MIN' => fn () => number_format(1.5, PHP_INT_MIN), 'sleep -1' => fn () => sleep(-1), 'usleep -1' => fn () => usleep(-1), ]; foreach ($cases as $name => $case) { try { $case(); echo "$name: no error\n"; } catch (\Throwable $e) { echo "$name: ", get_class($e), "\n"; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 16, Position 2 = 32
Branch analysis from position: 16
2 jumps found. (Code = 78) Position 1 = 17, Position 2 = 32
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 31
Branch analysis from position: 31
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 32
Found catch point at position: 24
Branch analysis from position: 24
2 jumps found. (Code = 107) Position 1 = 25, Position 2 = -2
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
filename:       /in/n09sa
function name:  (null)
number of ops:  34
compiled vars:  !0 = $cases, !1 = $case, !2 = $name, !3 = $e
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   DECLARE_LAMBDA_FUNCTION                              ~4      [0]
          1        INIT_ARRAY                                           ~5      ~4, 'array_filter+mode+3'
    5     2        DECLARE_LAMBDA_FUNCTION                              ~6      [1]
          3        ADD_ARRAY_ELEMENT                                    ~5      ~6, 'array_change_key_case+2'
    6     4        DECLARE_LAMBDA_FUNCTION                              ~7      [2]
          5        ADD_ARRAY_ELEMENT                                    ~5      ~7, 'pathinfo+3'
    7     6        DECLARE_LAMBDA_FUNCTION                              ~8      [3]
          7        ADD_ARRAY_ELEMENT                                    ~5      ~8, 'pathinfo+64'
    8     8        DECLARE_LAMBDA_FUNCTION                              ~9      [4]
          9        ADD_ARRAY_ELEMENT                                    ~5      ~9, 'number_format+decimals+PHP_INT_MIN'
    9    10        DECLARE_LAMBDA_FUNCTION                              ~10     [5]
         11        ADD_ARRAY_ELEMENT                                    ~5      ~10, 'sleep+-1'
   10    12        DECLARE_LAMBDA_FUNCTION                              ~11     [6]
         13        ADD_ARRAY_ELEMENT                                    ~5      ~11, 'usleep+-1'
    3    14        ASSIGN                                                       !0, ~5
   12    15      > FE_RESET_R                                           $13     !0, ->32
         16    > > FE_FETCH_R                                           ~14     $13, !1, ->32
         17    >   ASSIGN                                                       !2, ~14
   14    18        INIT_DYNAMIC_CALL                                            !1
         19        DO_FCALL                                          0          
   15    20        NOP                                                          
         21        FAST_CONCAT                                          ~17     !2, '%3A+no+error%0A'
         22        ECHO                                                         ~17
         23      > JMP                                                          ->31
   16    24  E > > CATCH                                           last         'Throwable'
   17    25    >   NOP                                                          
         26        FAST_CONCAT                                          ~18     !2, '%3A+'
         27        ECHO                                                         ~18
         28        GET_CLASS                                            ~19     !3
         29        ECHO                                                         ~19
         30        ECHO                                                         '%0A'
   12    31    > > JMP                                                          ->16
         32    >   FE_FREE                                                      $13
   19    33      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/n09sa
function name:  {closure:/in/n09sa:4}
number of ops:  7
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                                   'array_filter'
          1        SEND_VAL                                                     <array>
          2        SEND_VAL                                                     null
          3        SEND_VAL                                                     3
          4        DO_ICALL                                             $0      
          5      > RETURN                                                       $0
          6*     > RETURN                                                       null

End of Dynamic Function 0

Dynamic Function 1
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/n09sa
function name:  {closure:/in/n09sa:5}
number of ops:  6
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                                   'array_change_key_case'
          1        SEND_VAL                                                     <array>
          2        SEND_VAL                                                     2
          3        DO_ICALL                                             $0      
          4      > RETURN                                                       $0
          5*     > RETURN                                                       null

End of Dynamic Function 1

Dynamic Function 2
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/n09sa
function name:  {closure:/in/n09sa:6}
number of ops:  6
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                                   'pathinfo'
          1        SEND_VAL                                                     '%2Fa%2Fb.c'
          2        SEND_VAL                                                     3
          3        DO_ICALL                                             $0      
          4      > RETURN                                                       $0
          5*     > RETURN                                                       null

End of Dynamic Function 2

Dynamic Function 3
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/n09sa
function name:  {closure:/in/n09sa:7}
number of ops:  6
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                                   'pathinfo'
          1        SEND_VAL                                                     '%2Fa%2Fb.c'
          2        SEND_VAL                                                     64
          3        DO_ICALL                                             $0      
          4      > RETURN                                                       $0
          5*     > RETURN                                                       null

End of Dynamic Function 3

Dynamic Function 4
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/n09sa
function name:  {closure:/in/n09sa:8}
number of ops:  6
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                                   'number_format'
          1        SEND_VAL                                                     1.5
          2        SEND_VAL                                                     -9223372036854775808
          3        DO_ICALL                                             $0      
          4      > RETURN                                                       $0
          5*     > RETURN                                                       null

End of Dynamic Function 4

Dynamic Function 5
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/n09sa
function name:  {closure:/in/n09sa:9}
number of ops:  5
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                                   'sleep'
          1        SEND_VAL                                                     -1
          2        DO_ICALL                                             $0      
          3      > RETURN                                                       $0
          4*     > RETURN                                                       null

End of Dynamic Function 5

Dynamic Function 6
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/n09sa
function name:  {closure:/in/n09sa:10}
number of ops:  5
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   10     0  E >   INIT_FCALL                                                   'usleep'
          1        SEND_VAL                                                     -1
          2        DO_ICALL                                             $0      
          3      > RETURN                                                       $0
          4*     > RETURN                                                       null

End of Dynamic Function 6

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
125.34 ms | 504 KiB | 15 Q