3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Bar{} function foo(Bar ...$bars) { echo "Got " . count($bars) . " bars.\n"; } $bars = [new Bar, new Bar, new Bar]; foo(...$bars); $ints = [1, 2, 3]; try { foo(...$ints); } catch (Exception $e) { //echo $e }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 20
Branch analysis from position: 20
2 jumps found. (Code = 107) Position 1 = 21, Position 2 = -2
Branch analysis from position: 21
filename:       /in/XbX4t
function name:  (null)
number of ops:  22
compiled vars:  !0 = $bars, !1 = $ints, !2 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   NEW                                              $3      'Bar'
          1        DO_FCALL                                      0          
          2        INIT_ARRAY                                       ~5      $3
          3        NEW                                              $6      'Bar'
          4        DO_FCALL                                      0          
          5        ADD_ARRAY_ELEMENT                                ~5      $6
          6        NEW                                              $8      'Bar'
          7        DO_FCALL                                      0          
          8        ADD_ARRAY_ELEMENT                                ~5      $8
          9        ASSIGN                                                   !0, ~5
   12    10        INIT_FCALL                                               'foo'
         11        SEND_UNPACK                                              !0
         12        CHECK_UNDEF_ARGS                                         
         13        DO_FCALL                                      1          
   14    14        ASSIGN                                                   !1, <array>
   17    15        INIT_FCALL                                               'foo'
         16        SEND_UNPACK                                              !1
         17        CHECK_UNDEF_ARGS                                         
         18        DO_FCALL                                      1          
         19      > JMP                                                      ->21
   18    20  E > > CATCH                                       last         'Exception'
   20    21    > > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XbX4t
function name:  foo
number of ops:  6
compiled vars:  !0 = $bars
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV_VARIADIC                                    !0      
    7     1        COUNT                                            ~1      !0
          2        CONCAT                                           ~2      'Got+', ~1
          3        CONCAT                                           ~3      ~2, '+bars.%0A'
          4        ECHO                                                     ~3
    8     5      > RETURN                                                   null

End of function foo

Class Bar: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.27 ms | 1399 KiB | 15 Q