3v4l.org

run code in 300+ PHP versions simultaneously
<?php preg_match('/(\d+),?(\d*)/', " Koszt: 283,00 zł ", $transport); var_dump(filter_var($transport[1] . '.' . $transport[2], FILTER_VALIDATE_FLOAT)); preg_match('/(\d+),?(\d*)/', " Koszt: 283,04 zł ", $transport); var_dump(filter_var($transport[1] . '.' . $transport[2], FILTER_VALIDATE_FLOAT)); preg_match('/(\d+),?(\d*)/', " Koszt: 283 zł ", $transport); var_dump(filter_var($transport[1] . '.' . $transport[2], FILTER_VALIDATE_FLOAT));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iLunQ
function name:  (null)
number of ops:  49
compiled vars:  !0 = $transport
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'preg_match'
          1        SEND_VAL                                                 '%2F%28%5Cd%2B%29%2C%3F%28%5Cd%2A%29%2F'
          2        SEND_VAL                                                 '+Koszt%3A+283%2C00+z%C5%82+'
          3        SEND_REF                                                 !0
          4        DO_ICALL                                                 
    3     5        INIT_FCALL                                               'var_dump'
          6        INIT_FCALL                                               'filter_var'
          7        FETCH_DIM_R                                      ~2      !0, 1
          8        CONCAT                                           ~3      ~2, '.'
          9        FETCH_DIM_R                                      ~4      !0, 2
         10        CONCAT                                           ~5      ~3, ~4
         11        SEND_VAL                                                 ~5
         12        SEND_VAL                                                 259
         13        DO_ICALL                                         $6      
         14        SEND_VAR                                                 $6
         15        DO_ICALL                                                 
    5    16        INIT_FCALL                                               'preg_match'
         17        SEND_VAL                                                 '%2F%28%5Cd%2B%29%2C%3F%28%5Cd%2A%29%2F'
         18        SEND_VAL                                                 '+Koszt%3A+283%2C04+z%C5%82+'
         19        SEND_REF                                                 !0
         20        DO_ICALL                                                 
    6    21        INIT_FCALL                                               'var_dump'
         22        INIT_FCALL                                               'filter_var'
         23        FETCH_DIM_R                                      ~9      !0, 1
         24        CONCAT                                           ~10     ~9, '.'
         25        FETCH_DIM_R                                      ~11     !0, 2
         26        CONCAT                                           ~12     ~10, ~11
         27        SEND_VAL                                                 ~12
         28        SEND_VAL                                                 259
         29        DO_ICALL                                         $13     
         30        SEND_VAR                                                 $13
         31        DO_ICALL                                                 
    8    32        INIT_FCALL                                               'preg_match'
         33        SEND_VAL                                                 '%2F%28%5Cd%2B%29%2C%3F%28%5Cd%2A%29%2F'
         34        SEND_VAL                                                 '+Koszt%3A+283+z%C5%82+'
         35        SEND_REF                                                 !0
         36        DO_ICALL                                                 
    9    37        INIT_FCALL                                               'var_dump'
         38        INIT_FCALL                                               'filter_var'
         39        FETCH_DIM_R                                      ~16     !0, 1
         40        CONCAT                                           ~17     ~16, '.'
         41        FETCH_DIM_R                                      ~18     !0, 2
         42        CONCAT                                           ~19     ~17, ~18
         43        SEND_VAL                                                 ~19
         44        SEND_VAL                                                 259
         45        DO_ICALL                                         $20     
         46        SEND_VAR                                                 $20
         47        DO_ICALL                                                 
         48      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.92 ms | 1005 KiB | 16 Q