3v4l.org

run code in 300+ PHP versions simultaneously
<?php $transport = " Koszt: 283,00 zł "; $transport = str_replace('Koszt:' ,'', $transport); $transport = str_replace('zł', '', $transport); //usuwam zł $transport = preg_replace('/\s+/', '', $transport); //usuwam niewidoczne znaki "spacje" $transport = str_replace(',' ,'.', $transport); //zamieniam przecinek na kropke var_dump(filter_var($transport, FILTER_VALIDATE_FLOAT));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GIo16
function name:  (null)
number of ops:  33
compiled vars:  !0 = $transport
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '+Koszt%3A+283%2C00+z%C5%82+'
    4     1        INIT_FCALL                                               'str_replace'
          2        SEND_VAL                                                 'Koszt%3A'
          3        SEND_VAL                                                 ''
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6        ASSIGN                                                   !0, $2
    5     7        INIT_FCALL                                               'str_replace'
          8        SEND_VAL                                                 'z%C5%82'
          9        SEND_VAL                                                 ''
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $4      
         12        ASSIGN                                                   !0, $4
    6    13        INIT_FCALL                                               'preg_replace'
         14        SEND_VAL                                                 '%2F%5Cs%2B%2F'
         15        SEND_VAL                                                 ''
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                         $6      
         18        ASSIGN                                                   !0, $6
    7    19        INIT_FCALL                                               'str_replace'
         20        SEND_VAL                                                 '%2C'
         21        SEND_VAL                                                 '.'
         22        SEND_VAR                                                 !0
         23        DO_ICALL                                         $8      
         24        ASSIGN                                                   !0, $8
    9    25        INIT_FCALL                                               'var_dump'
         26        INIT_FCALL                                               'filter_var'
         27        SEND_VAR                                                 !0
         28        SEND_VAL                                                 259
         29        DO_ICALL                                         $10     
         30        SEND_VAR                                                 $10
         31        DO_ICALL                                                 
         32      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.54 ms | 1002 KiB | 17 Q