3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(preg_match('#[^0-9./]#','/123l/')); if(!preg_match('#[^0-9./]#','/123l/')) { echo "Value is numeric \n"; } else { echo "Value not numeric \n"; } $plate_number = '1234/5474'; preg_match_all('#[0-9]#',$plate_number,$new_plate_number); var_dump($new_plate_number); var_dump(implode('',$new_plate_number[0])); $arr = explode('1',$plate_number); var_dump($arr);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 15
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cRive
function name:  (null)
number of ops:  42
compiled vars:  !0 = $plate_number, !1 = $new_plate_number, !2 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'preg_match'
          2        SEND_VAL                                                 '%23%5B%5E0-9.%2F%5D%23'
          3        SEND_VAL                                                 '%2F123l%2F'
          4        DO_ICALL                                         $3      
          5        SEND_VAR                                                 $3
          6        DO_ICALL                                                 
    4     7        INIT_FCALL                                               'preg_match'
          8        SEND_VAL                                                 '%23%5B%5E0-9.%2F%5D%23'
          9        SEND_VAL                                                 '%2F123l%2F'
         10        DO_ICALL                                         $5      
         11        BOOL_NOT                                         ~6      $5
         12      > JMPZ                                                     ~6, ->15
    6    13    >   ECHO                                                     'Value+is+numeric+%0A'
    4    14      > JMP                                                      ->16
   10    15    >   ECHO                                                     'Value+not+numeric+%0A'
   12    16    >   ASSIGN                                                   !0, '1234%2F5474'
   13    17        INIT_FCALL                                               'preg_match_all'
         18        SEND_VAL                                                 '%23%5B0-9%5D%23'
         19        SEND_VAR                                                 !0
         20        SEND_REF                                                 !1
         21        DO_ICALL                                                 
   14    22        INIT_FCALL                                               'var_dump'
         23        SEND_VAR                                                 !1
         24        DO_ICALL                                                 
   15    25        INIT_FCALL                                               'var_dump'
         26        INIT_FCALL                                               'implode'
         27        SEND_VAL                                                 ''
         28        FETCH_DIM_R                                      ~10     !1, 0
         29        SEND_VAL                                                 ~10
         30        DO_ICALL                                         $11     
         31        SEND_VAR                                                 $11
         32        DO_ICALL                                                 
   18    33        INIT_FCALL                                               'explode'
         34        SEND_VAL                                                 '1'
         35        SEND_VAR                                                 !0
         36        DO_ICALL                                         $13     
         37        ASSIGN                                                   !2, $13
   19    38        INIT_FCALL                                               'var_dump'
         39        SEND_VAR                                                 !2
         40        DO_ICALL                                                 
         41      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.23 ms | 1468 KiB | 18 Q