3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'November 1997'; var_dump( (int) $str, intval($str), filter_var($str, FILTER_SANITIZE_NUMBER_INT), preg_match('/\d{4}/', $str) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/W8XvQ
function name:  (null)
number of ops:  18
compiled vars:  !0 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'November+1997'
    3     1        INIT_FCALL                                               'var_dump'
    4     2        CAST                                          4  ~2      !0
          3        SEND_VAL                                                 ~2
    5     4        CAST                                          4  ~3      !0
          5        SEND_VAL                                                 ~3
    6     6        INIT_FCALL                                               'filter_var'
          7        SEND_VAR                                                 !0
          8        SEND_VAL                                                 519
          9        DO_ICALL                                         $4      
         10        SEND_VAR                                                 $4
    7    11        INIT_FCALL                                               'preg_match'
         12        SEND_VAL                                                 '%2F%5Cd%7B4%7D%2F'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                         $5      
         15        SEND_VAR                                                 $5
         16        DO_ICALL                                                 
    8    17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.68 ms | 1394 KiB | 19 Q