3v4l.org

run code in 300+ PHP versions simultaneously
<?php $rate1 = 0.02; $var = sprintf("%.2f",1260); echo $var,"\n\n"; $product = $var * $rate1; var_dump("product: $product"); // two ways to format $product echo number_format( $product, 2),"\n"; echo printf("%.2f",$product);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4FFLQ
function name:  (null)
number of ops:  27
compiled vars:  !0 = $rate1, !1 = $var, !2 = $product
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 0.02
    4     1        INIT_FCALL                                               'sprintf'
          2        SEND_VAL                                                 '%25.2f'
          3        SEND_VAL                                                 1260
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !1, $4
    5     6        ECHO                                                     !1
          7        ECHO                                                     '%0A%0A'
    7     8        MUL                                              ~6      !1, !0
          9        ASSIGN                                                   !2, ~6
    8    10        INIT_FCALL                                               'var_dump'
         11        NOP                                                      
         12        FAST_CONCAT                                      ~8      'product%3A+', !2
         13        SEND_VAL                                                 ~8
         14        DO_ICALL                                                 
   11    15        INIT_FCALL                                               'number_format'
         16        SEND_VAR                                                 !2
         17        SEND_VAL                                                 2
         18        DO_ICALL                                         $10     
         19        ECHO                                                     $10
         20        ECHO                                                     '%0A'
   13    21        INIT_FCALL                                               'printf'
         22        SEND_VAL                                                 '%25.2f'
         23        SEND_VAR                                                 !2
         24        DO_ICALL                                         $11     
         25        ECHO                                                     $11
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.55 ms | 1395 KiB | 21 Q