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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.31 ms | 1400 KiB | 21 Q