3v4l.org

run code in 300+ PHP versions simultaneously
<?php function format_pln(float $price): string { $rounded = round($price, 2, PHP_ROUND_HALF_UP); return number_format($rounded, 2, ',', ' ') . ' zł'; } // example: echo format_pln(9104.6640); // 9 104,66 zł echo format_pln(2094.0727); // 2 094,07 zł echo format_pln(11198.7367); // 11 198,74 zł
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sBmk1
function name:  (null)
number of ops:  13
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'format_pln'
          1        SEND_VAL                                                 9104.66
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
    9     4        INIT_FCALL                                               'format_pln'
          5        SEND_VAL                                                 2094.07
          6        DO_FCALL                                      0  $1      
          7        ECHO                                                     $1
   10     8        INIT_FCALL                                               'format_pln'
          9        SEND_VAL                                                 11198.7
         10        DO_FCALL                                      0  $2      
         11        ECHO                                                     $2
         12      > RETURN                                                   1

Function format_pln:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sBmk1
function name:  format_pln
number of ops:  18
compiled vars:  !0 = $price, !1 = $rounded
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        INIT_FCALL                                               'round'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 2
          4        SEND_VAL                                                 1
          5        DO_ICALL                                         $2      
          6        ASSIGN                                                   !1, $2
    4     7        INIT_FCALL                                               'number_format'
          8        SEND_VAR                                                 !1
          9        SEND_VAL                                                 2
         10        SEND_VAL                                                 '%2C'
         11        SEND_VAL                                                 '+'
         12        DO_ICALL                                         $4      
         13        CONCAT                                           ~5      $4, '+z%C5%82'
         14        VERIFY_RETURN_TYPE                                       ~5
         15      > RETURN                                                   ~5
    5    16*       VERIFY_RETURN_TYPE                                       
         17*     > RETURN                                                   null

End of function format_pln

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.07 ms | 1006 KiB | 18 Q