3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = 4121.57; $b = 3998; $c = 123.57; $d = round( $a - $b - $c, 2); $e = round( $d, 2 ); echo "\n"; echo str_pad(print_r($d,TRUE),4,' ')." // NEGATIVE ZERO?"."\n"; echo str_pad(print_r($e,TRUE),4,' ')." // Don't worry, it rounds to zero! -_-"."\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Etupv
function name:  (null)
number of ops:  41
compiled vars:  !0 = $a, !1 = $b, !2 = $c, !3 = $d, !4 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 4121.57
    3     1        ASSIGN                                                   !1, 3998
    4     2        ASSIGN                                                   !2, 123.57
    5     3        INIT_FCALL                                               'round'
          4        SUB                                              ~8      !0, !1
          5        SUB                                              ~9      ~8, !2
          6        SEND_VAL                                                 ~9
          7        SEND_VAL                                                 2
          8        DO_ICALL                                         $10     
          9        ASSIGN                                                   !3, $10
    6    10        INIT_FCALL                                               'round'
         11        SEND_VAR                                                 !3
         12        SEND_VAL                                                 2
         13        DO_ICALL                                         $12     
         14        ASSIGN                                                   !4, $12
    7    15        ECHO                                                     '%0A'
    8    16        INIT_FCALL                                               'str_pad'
         17        INIT_FCALL                                               'print_r'
         18        SEND_VAR                                                 !3
         19        SEND_VAL                                                 <true>
         20        DO_ICALL                                         $14     
         21        SEND_VAR                                                 $14
         22        SEND_VAL                                                 4
         23        SEND_VAL                                                 '+'
         24        DO_ICALL                                         $15     
         25        CONCAT                                           ~16     $15, '+%2F%2F+NEGATIVE+ZERO%3F'
         26        CONCAT                                           ~17     ~16, '%0A'
         27        ECHO                                                     ~17
    9    28        INIT_FCALL                                               'str_pad'
         29        INIT_FCALL                                               'print_r'
         30        SEND_VAR                                                 !4
         31        SEND_VAL                                                 <true>
         32        DO_ICALL                                         $18     
         33        SEND_VAR                                                 $18
         34        SEND_VAL                                                 4
         35        SEND_VAL                                                 '+'
         36        DO_ICALL                                         $19     
         37        CONCAT                                           ~20     $19, '+%2F%2F+Don%27t+worry%2C+it+rounds+to+zero%21++-_-'
         38        CONCAT                                           ~21     ~20, '%0A'
         39        ECHO                                                     ~21
         40      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.03 ms | 1396 KiB | 19 Q