3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * Toon een getal: 8627.89 * als een bedrag: € 8.627,89 */ // Het getal $getal = 8627.89; // Het begin van het bedrag: euroteken en vaste spatie $bedrag = '&euro;&nbsp;'; // De rest van het getal toevoegen aan het bedrag if ($getal == abs($getal)) { $bedrag .= number_format($getal, 0, ',', '.') . ',-'; } else { $bedrag .= number_format($getal, 2, ',', '.'); } // Testdump echo $bedrag;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 16
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LvQYp
function name:  (null)
number of ops:  25
compiled vars:  !0 = $getal, !1 = $bedrag
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ASSIGN                                                   !0, 8627.89
   12     1        ASSIGN                                                   !1, '%26euro%3B%26nbsp%3B'
   15     2        INIT_FCALL                                               'abs'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $4      
          5        IS_EQUAL                                                 !0, $4
          6      > JMPZ                                                     ~5, ->16
   16     7    >   INIT_FCALL                                               'number_format'
          8        SEND_VAR                                                 !0
          9        SEND_VAL                                                 0
         10        SEND_VAL                                                 '%2C'
         11        SEND_VAL                                                 '.'
         12        DO_ICALL                                         $6      
         13        CONCAT                                           ~7      $6, '%2C-'
         14        ASSIGN_OP                                     8          !1, ~7
         15      > JMP                                                      ->23
   18    16    >   INIT_FCALL                                               'number_format'
         17        SEND_VAR                                                 !0
         18        SEND_VAL                                                 2
         19        SEND_VAL                                                 '%2C'
         20        SEND_VAL                                                 '.'
         21        DO_ICALL                                         $9      
         22        ASSIGN_OP                                     8          !1, $9
   22    23    >   ECHO                                                     !1
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.21 ms | 1400 KiB | 17 Q