3v4l.org

run code in 300+ PHP versions simultaneously
<?php function check_type($value) { var_dump($value); return $value; } $values = [ null, false, true, 42, 45.15, 'hello', ['array1', 'array2', 15, 25], new stdClass(), gmp_init('4444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444'), ]; foreach ($values as $value) { $filtered_var = filter_var($value, FILTER_CALLBACK, ['options' => 'check_type']); var_dump($filtered_var); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 16, Position 2 = 27
Branch analysis from position: 16
2 jumps found. (Code = 78) Position 1 = 17, Position 2 = 27
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 27
filename:       /in/J6k7r
function name:  (null)
number of ops:  29
compiled vars:  !0 = $values, !1 = $value, !2 = $filtered_var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_ARRAY                                       ~3      null
          1        ADD_ARRAY_ELEMENT                                ~3      <false>
          2        ADD_ARRAY_ELEMENT                                ~3      <true>
   13     3        ADD_ARRAY_ELEMENT                                ~3      42
   14     4        ADD_ARRAY_ELEMENT                                ~3      45.15
   15     5        ADD_ARRAY_ELEMENT                                ~3      'hello'
   10     6        ADD_ARRAY_ELEMENT                                ~3      <array>
   17     7        NEW                                              $4      'stdClass'
          8        DO_FCALL                                      0          
          9        ADD_ARRAY_ELEMENT                                ~3      $4
   18    10        INIT_FCALL_BY_NAME                                       'gmp_init'
         11        SEND_VAL_EX                                              '4444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444'
         12        DO_FCALL                                      0  $6      
         13        ADD_ARRAY_ELEMENT                                ~3      $6
    9    14        ASSIGN                                                   !0, ~3
   21    15      > FE_RESET_R                                       $8      !0, ->27
         16    > > FE_FETCH_R                                               $8, !1, ->27
   22    17    >   INIT_FCALL                                               'filter_var'
         18        SEND_VAR                                                 !1
         19        SEND_VAL                                                 1024
         20        SEND_VAL                                                 <array>
         21        DO_ICALL                                         $9      
         22        ASSIGN                                                   !2, $9
   23    23        INIT_FCALL                                               'var_dump'
         24        SEND_VAR                                                 !2
         25        DO_ICALL                                                 
   21    26      > JMP                                                      ->16
         27    >   FE_FREE                                                  $8
   24    28      > RETURN                                                   1

Function check_type:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/J6k7r
function name:  check_type
number of ops:  6
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
    6     4      > RETURN                                                   !0
    7     5*     > RETURN                                                   null

End of function check_type

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.94 ms | 1451 KiB | 15 Q