3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(filter_var('x', FILTER_VALIDATE_INT, [ 'options' => ['default' => 9], ])); var_dump(filter_var(STDERR, FILTER_VALIDATE_INT, [ 'options' => ['default' => 9], ])); var_dump(filter_var((object) [], FILTER_VALIDATE_INT, [ 'options' => ['default' => 9], ])); var_dump(filter_var([], FILTER_VALIDATE_INT, [ 'options' => ['default' => 9], ]));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aOnXr
function name:  (null)
number of ops:  35
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'filter_var'
          2        SEND_VAL                                                 'x'
          3        SEND_VAL                                                 257
    3     4        SEND_VAL                                                 <array>
          5        DO_ICALL                                         $0      
          6        SEND_VAR                                                 $0
          7        DO_ICALL                                                 
    7     8        INIT_FCALL                                               'var_dump'
          9        INIT_FCALL                                               'filter_var'
         10        FETCH_CONSTANT                                   ~2      'STDERR'
         11        SEND_VAL                                                 ~2
         12        SEND_VAL                                                 257
    8    13        SEND_VAL                                                 <array>
         14        DO_ICALL                                         $3      
         15        SEND_VAR                                                 $3
         16        DO_ICALL                                                 
   11    17        INIT_FCALL                                               'var_dump'
         18        INIT_FCALL                                               'filter_var'
         19        CAST                                          8  ~5      <array>
         20        SEND_VAL                                                 ~5
         21        SEND_VAL                                                 257
   12    22        SEND_VAL                                                 <array>
         23        DO_ICALL                                         $6      
         24        SEND_VAR                                                 $6
         25        DO_ICALL                                                 
   15    26        INIT_FCALL                                               'var_dump'
         27        INIT_FCALL                                               'filter_var'
         28        SEND_VAL                                                 <array>
         29        SEND_VAL                                                 257
   16    30        SEND_VAL                                                 <array>
         31        DO_ICALL                                         $8      
         32        SEND_VAR                                                 $8
         33        DO_ICALL                                                 
   17    34      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.44 ms | 1396 KiB | 17 Q