3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Model {}; function select(string $key, string ...$keys): Model { \array_unshift($keys, $key); foreach ($keys as &$key) { $key = \preg_replace_callback('/([a-zA-Z]+)\((.*)\)/', function ($match) { return \sprintf('%s(%s)', $match[1], "foo"); }, $key); } return new Model; } select("x", 'a', 'b', 'c');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gpIV9
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   INIT_FCALL                                               'select'
          1        SEND_VAL                                                 'x'
          2        SEND_VAL                                                 'a'
          3        SEND_VAL                                                 'b'
          4        SEND_VAL                                                 'c'
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Function select:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 7, Position 2 = 16
Branch analysis from position: 7
2 jumps found. (Code = 126) Position 1 = 8, Position 2 = 16
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/gpIV9
function name:  select
number of ops:  23
compiled vars:  !0 = $key, !1 = $keys
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV_VARIADIC                                    !1      
    7     2        INIT_FCALL                                               'array_unshift'
          3        SEND_REF                                                 !1
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                                 
    9     6      > FE_RESET_RW                                      $3      !1, ->16
          7    > > FE_FETCH_RW                                              $3, !0, ->16
   10     8    >   INIT_FCALL                                               'preg_replace_callback'
          9        SEND_VAL                                                 '%2F%28%5Ba-zA-Z%5D%2B%29%5C%28%28.%2A%29%5C%29%2F'
         10        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FgpIV9%3A10%240'
   12    11        SEND_VAL                                                 ~4
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                         $5      
   10    14        ASSIGN                                                   !0, $5
    9    15      > JMP                                                      ->7
         16    >   FE_FREE                                                  $3
   15    17        NEW                                              $7      'Model'
         18        DO_FCALL                                      0          
         19        VERIFY_RETURN_TYPE                                       $7
         20      > RETURN                                                   $7
   16    21*       VERIFY_RETURN_TYPE                                       
         22*     > RETURN                                                   null

End of function select

Function %00%7Bclosure%7D%2Fin%2FgpIV9%3A10%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gpIV9
function name:  {closure}
number of ops:  9
compiled vars:  !0 = $match
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   11     1        INIT_FCALL                                               'sprintf'
          2        SEND_VAL                                                 '%25s%28%25s%29'
          3        FETCH_DIM_R                                      ~1      !0, 1
          4        SEND_VAL                                                 ~1
          5        SEND_VAL                                                 'foo'
          6        DO_ICALL                                         $2      
          7      > RETURN                                                   $2
   12     8*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FgpIV9%3A10%240

Class Model: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.93 ms | 1403 KiB | 20 Q