3v4l.org

run code in 300+ PHP versions simultaneously
<?php $result = array(); function show_all($keys){ global $result; foreach ($keys as $key) { if(is_array($key)) show_all($key); else{ $refFunc = new ReflectionFunction($key); foreach( $refFunc->getParameters() as $param ){ if(preg_match('/assertion|callback/',$param->name)) $result[$key] = 1; } } } } show_all(get_defined_functions()); foreach (array_keys($result) as $key) { print "$key:\n"; $refFunc = new ReflectionFunction($key); foreach( $refFunc->getParameters() as $param ){ print "\t$param\n"; } } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 10, Position 2 = 29
Branch analysis from position: 10
2 jumps found. (Code = 78) Position 1 = 11, Position 2 = 29
Branch analysis from position: 11
2 jumps found. (Code = 77) Position 1 = 21, Position 2 = 27
Branch analysis from position: 21
2 jumps found. (Code = 78) Position 1 = 22, Position 2 = 27
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
Branch analysis from position: 27
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 27
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 29
filename:       /in/QggS6
function name:  (null)
number of ops:  31
compiled vars:  !0 = $result, !1 = $key, !2 = $refFunc, !3 = $param
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   21     1        INIT_FCALL                                               'show_all'
          2        INIT_FCALL                                               'get_defined_functions'
          3        DO_ICALL                                         $5      
          4        SEND_VAR                                                 $5
          5        DO_FCALL                                      0          
   22     6        INIT_FCALL                                               'array_keys'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $7      
          9      > FE_RESET_R                                       $8      $7, ->29
         10    > > FE_FETCH_R                                               $8, !1, ->29
   23    11    >   NOP                                                      
         12        FAST_CONCAT                                      ~9      !1, '%3A%0A'
         13        ECHO                                                     ~9
   24    14        NEW                                              $10     'ReflectionFunction'
         15        SEND_VAR_EX                                              !1
         16        DO_FCALL                                      0          
         17        ASSIGN                                                   !2, $10
   25    18        INIT_METHOD_CALL                                         !2, 'getParameters'
         19        DO_FCALL                                      0  $13     
         20      > FE_RESET_R                                       $14     $13, ->27
         21    > > FE_FETCH_R                                               $14, !3, ->27
   26    22    >   ROPE_INIT                                     3  ~16     '%09'
         23        ROPE_ADD                                      1  ~16     ~16, !3
         24        ROPE_END                                      2  ~15     ~16, '%0A'
         25        ECHO                                                     ~15
   25    26      > JMP                                                      ->21
         27    >   FE_FREE                                                  $14
   22    28      > JMP                                                      ->10
         29    >   FE_FREE                                                  $8
   29    30      > RETURN                                                   1

Function show_all:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 29
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 29
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 10
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 10
2 jumps found. (Code = 77) Position 1 = 17, Position 2 = 27
Branch analysis from position: 17
2 jumps found. (Code = 78) Position 1 = 18, Position 2 = 27
Branch analysis from position: 18
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 26
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
Branch analysis from position: 26
Branch analysis from position: 27
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 27
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 29
filename:       /in/QggS6
function name:  show_all
number of ops:  31
compiled vars:  !0 = $keys, !1 = $result, !2 = $key, !3 = $refFunc, !4 = $param
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        BIND_GLOBAL                                              !1, 'result'
    7     2      > FE_RESET_R                                       $5      !0, ->29
          3    > > FE_FETCH_R                                               $5, !2, ->29
    8     4    >   TYPE_CHECK                                  128          !2
          5      > JMPZ                                                     ~6, ->10
    9     6    >   INIT_FCALL_BY_NAME                                       'show_all'
          7        SEND_VAR_EX                                              !2
          8        DO_FCALL                                      0          
          9      > JMP                                                      ->28
   11    10    >   NEW                                              $8      'ReflectionFunction'
         11        SEND_VAR_EX                                              !2
         12        DO_FCALL                                      0          
         13        ASSIGN                                                   !3, $8
   12    14        INIT_METHOD_CALL                                         !3, 'getParameters'
         15        DO_FCALL                                      0  $11     
         16      > FE_RESET_R                                       $12     $11, ->27
         17    > > FE_FETCH_R                                               $12, !4, ->27
   13    18    >   INIT_FCALL                                               'preg_match'
         19        SEND_VAL                                                 '%2Fassertion%7Ccallback%2F'
         20        FETCH_OBJ_R                                      ~13     !4, 'name'
         21        SEND_VAL                                                 ~13
         22        DO_ICALL                                         $14     
         23      > JMPZ                                                     $14, ->26
   14    24    >   ASSIGN_DIM                                               !1, !2
         25        OP_DATA                                                  1
   12    26    > > JMP                                                      ->17
         27    >   FE_FREE                                                  $12
    7    28    > > JMP                                                      ->3
         29    >   FE_FREE                                                  $5
   18    30      > RETURN                                                   null

End of function show_all

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.1 ms | 1403 KiB | 20 Q