3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(filter_var('123a.56', FILTER_VALIDATE_REGEXP,array("options"=>array("regexp"=>"/^([1-9][0-9]*|0)(\.[0-9]{2})?$/")))); var_dump(filter_var('abc34', FILTER_VALIDATE_REGEXP,array("options"=>array("regexp"=>"/\d+(?:\.\d{1,2})?/")))); var_dump(filter_var('123.56', FILTER_VALIDATE_REGEXP,array("options"=>array("regexp"=>"~^\\d+(?:\\.\\d{1,2})?$~"))));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/s96uT
function name:  (null)
number of ops:  25
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                                                 '123a.56'
          3        SEND_VAL                                                 272
          4        SEND_VAL                                                 <array>
          5        DO_ICALL                                         $0      
          6        SEND_VAR                                                 $0
          7        DO_ICALL                                                 
    3     8        INIT_FCALL                                               'var_dump'
          9        INIT_FCALL                                               'filter_var'
         10        SEND_VAL                                                 'abc34'
         11        SEND_VAL                                                 272
         12        SEND_VAL                                                 <array>
         13        DO_ICALL                                         $2      
         14        SEND_VAR                                                 $2
         15        DO_ICALL                                                 
    4    16        INIT_FCALL                                               'var_dump'
         17        INIT_FCALL                                               'filter_var'
         18        SEND_VAL                                                 '123.56'
         19        SEND_VAL                                                 272
         20        SEND_VAL                                                 <array>
         21        DO_ICALL                                         $4      
         22        SEND_VAR                                                 $4
         23        DO_ICALL                                                 
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.06 ms | 1386 KiB | 17 Q