3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo number_format(round(3.2550, 2), strlen(substr(strrchr(3.2550, "."), 1)), ',', '.'); echo PHP_EOL; echo number_format(round(3.4000, 2), strlen(substr(strrchr(3.4000, "."), 1)), ',', '.');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JtW6h
function name:  (null)
number of ops:  42
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'number_format'
          1        INIT_FCALL                                               'round'
          2        SEND_VAL                                                 3.255
          3        SEND_VAL                                                 2
          4        DO_ICALL                                         $0      
          5        SEND_VAR                                                 $0
          6        INIT_FCALL                                               'substr'
          7        INIT_FCALL                                               'strrchr'
          8        SEND_VAL                                                 3.255
          9        SEND_VAL                                                 '.'
         10        DO_ICALL                                         $1      
         11        SEND_VAR                                                 $1
         12        SEND_VAL                                                 1
         13        DO_ICALL                                         $2      
         14        STRLEN                                           ~3      $2
         15        SEND_VAL                                                 ~3
         16        SEND_VAL                                                 '%2C'
         17        SEND_VAL                                                 '.'
         18        DO_ICALL                                         $4      
         19        ECHO                                                     $4
    3    20        ECHO                                                     '%0A'
    4    21        INIT_FCALL                                               'number_format'
         22        INIT_FCALL                                               'round'
         23        SEND_VAL                                                 3.4
         24        SEND_VAL                                                 2
         25        DO_ICALL                                         $5      
         26        SEND_VAR                                                 $5
         27        INIT_FCALL                                               'substr'
         28        INIT_FCALL                                               'strrchr'
         29        SEND_VAL                                                 3.4
         30        SEND_VAL                                                 '.'
         31        DO_ICALL                                         $6      
         32        SEND_VAR                                                 $6
         33        SEND_VAL                                                 1
         34        DO_ICALL                                         $7      
         35        STRLEN                                           ~8      $7
         36        SEND_VAL                                                 ~8
         37        SEND_VAL                                                 '%2C'
         38        SEND_VAL                                                 '.'
         39        DO_ICALL                                         $9      
         40        ECHO                                                     $9
         41      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.12 ms | 1396 KiB | 21 Q