3v4l.org

run code in 300+ PHP versions simultaneously
<?php $price = round(59.15 * 6.55957,2); echo $price."\n"; echo str_replace(".", "", $price)."\n"; $price = number_format($price, 2); echo $price."\n"; $price = str_replace(".", "", $price); echo $price."\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sgOW8
function name:  (null)
number of ops:  30
compiled vars:  !0 = $price
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'round'
          1        SEND_VAL                                                 387.999
          2        SEND_VAL                                                 2
          3        DO_ICALL                                         $1      
          4        ASSIGN                                                   !0, $1
    3     5        CONCAT                                           ~3      !0, '%0A'
          6        ECHO                                                     ~3
    4     7        INIT_FCALL                                               'str_replace'
          8        SEND_VAL                                                 '.'
          9        SEND_VAL                                                 ''
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $4      
         12        CONCAT                                           ~5      $4, '%0A'
         13        ECHO                                                     ~5
    5    14        INIT_FCALL                                               'number_format'
         15        SEND_VAR                                                 !0
         16        SEND_VAL                                                 2
         17        DO_ICALL                                         $6      
         18        ASSIGN                                                   !0, $6
    6    19        CONCAT                                           ~8      !0, '%0A'
         20        ECHO                                                     ~8
    7    21        INIT_FCALL                                               'str_replace'
         22        SEND_VAL                                                 '.'
         23        SEND_VAL                                                 ''
         24        SEND_VAR                                                 !0
         25        DO_ICALL                                         $9      
         26        ASSIGN                                                   !0, $9
    8    27        CONCAT                                           ~11     !0, '%0A'
         28        ECHO                                                     ~11
         29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.15 ms | 1395 KiB | 19 Q