3v4l.org

run code in 300+ PHP versions simultaneously
<?php $my_num = 131510; $dec = number_format($my_num / 100, 3, '.', ','); echo $dec . "\n"; echo (float) $dec; echo PHP_EOL; $foo = "10510"; echo (float) number_format((float)$foo / 100, 3, '.', ''); // Outputs -> 105.00
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/t4pvi
function name:  (null)
number of ops:  26
compiled vars:  !0 = $my_num, !1 = $dec, !2 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 131510
    5     1        INIT_FCALL                                               'number_format'
          2        DIV                                              ~4      !0, 100
          3        SEND_VAL                                                 ~4
          4        SEND_VAL                                                 3
          5        SEND_VAL                                                 '.'
          6        SEND_VAL                                                 '%2C'
          7        DO_ICALL                                         $5      
          8        ASSIGN                                                   !1, $5
    6     9        CONCAT                                           ~7      !1, '%0A'
         10        ECHO                                                     ~7
    8    11        CAST                                          5  ~8      !1
         12        ECHO                                                     ~8
    9    13        ECHO                                                     '%0A'
   10    14        ASSIGN                                                   !2, '10510'
   11    15        INIT_FCALL                                               'number_format'
         16        CAST                                          5  ~10     !2
         17        DIV                                              ~11     ~10, 100
         18        SEND_VAL                                                 ~11
         19        SEND_VAL                                                 3
         20        SEND_VAL                                                 '.'
         21        SEND_VAL                                                 ''
         22        DO_ICALL                                         $12     
         23        CAST                                          5  ~13     $12
         24        ECHO                                                     ~13
         25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.13 ms | 1395 KiB | 15 Q