3v4l.org

run code in 300+ PHP versions simultaneously
<?php $number = 2345.96; // rozbijanie liczby $numbers = explode('.', $number); $decimal = end($numbers); echo $decimal.' '; // zaokrąglenie i odejmowanie $integer = floor($number); $decimal = ($number-$integer)*100; echo number_format($decimal, 0).' '; // wycięcie 2 cyfr od tyłu liczby $decimal = substr($number, -2); echo $decimal.' ';
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9A2SK
function name:  (null)
number of ops:  33
compiled vars:  !0 = $number, !1 = $numbers, !2 = $decimal, !3 = $integer
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 2345.96
    6     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '.'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $5      
          5        ASSIGN                                                   !1, $5
    7     6        INIT_FCALL                                               'end'
          7        SEND_REF                                                 !1
          8        DO_ICALL                                         $7      
          9        ASSIGN                                                   !2, $7
    8    10        CONCAT                                           ~9      !2, '+'
         11        ECHO                                                     ~9
   11    12        INIT_FCALL                                               'floor'
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                         $10     
         15        ASSIGN                                                   !3, $10
   12    16        SUB                                              ~12     !0, !3
         17        MUL                                              ~13     ~12, 100
         18        ASSIGN                                                   !2, ~13
   13    19        INIT_FCALL                                               'number_format'
         20        SEND_VAR                                                 !2
         21        SEND_VAL                                                 0
         22        DO_ICALL                                         $15     
         23        CONCAT                                           ~16     $15, '+'
         24        ECHO                                                     ~16
   16    25        INIT_FCALL                                               'substr'
         26        SEND_VAR                                                 !0
         27        SEND_VAL                                                 -2
         28        DO_ICALL                                         $17     
         29        ASSIGN                                                   !2, $17
   17    30        CONCAT                                           ~19     !2, '+'
         31        ECHO                                                     ~19
         32      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.68 ms | 941 KiB | 24 Q