3v4l.org

run code in 300+ PHP versions simultaneously
<?php $number_1 = 0.01; $number_2 = 3.22321; $result = $number_1 * $number_2; $decimals = strlen($number_1) - strpos($number_1, ".")-1; Echo number_format($result, $decimals);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fGW5N
function name:  (null)
number of ops:  18
compiled vars:  !0 = $number_1, !1 = $number_2, !2 = $result, !3 = $decimals
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 0.01
    4     1        ASSIGN                                                   !1, 3.22321
    5     2        MUL                                              ~6      !0, !1
          3        ASSIGN                                                   !2, ~6
    7     4        STRLEN                                           ~8      !0
          5        INIT_FCALL                                               'strpos'
          6        SEND_VAR                                                 !0
          7        SEND_VAL                                                 '.'
          8        DO_ICALL                                         $9      
          9        SUB                                              ~10     ~8, $9
         10        SUB                                              ~11     ~10, 1
         11        ASSIGN                                                   !3, ~11
    9    12        INIT_FCALL                                               'number_format'
         13        SEND_VAR                                                 !2
         14        SEND_VAR                                                 !3
         15        DO_ICALL                                         $13     
         16        ECHO                                                     $13
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
127.19 ms | 1399 KiB | 17 Q