3v4l.org

run code in 500+ PHP versions simultaneously
<?php // https://bugs.php.net/bug.php?id=66011 // Test script as provided in original bug report $a = strval(round(1 / 3, 2)); var_dump($a, serialize($a)); // Code which does show this behaviour // Behaviour as expected, see the warning at http://php.net/manual/en/language.types.float.php $a = round(1 / 3, 2); var_dump($a, serialize($a));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nCNWi
function name:  (null)
number of ops:  26
compiled vars:  !0 = $a
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                                   'round'
          1        SEND_VAL                                                     0.333333
          2        SEND_VAL                                                     2
          3        DO_ICALL                                             $1      
          4        CAST                                              6  ~2      $1
          5        ASSIGN                                                       !0, ~2
    8     6        INIT_FCALL                                                   'var_dump'
          7        SEND_VAR                                                     !0
          8        INIT_FCALL                                                   'serialize'
          9        SEND_VAR                                                     !0
         10        DO_ICALL                                             $4      
         11        SEND_VAR                                                     $4
         12        DO_ICALL                                                     
   12    13        INIT_FCALL                                                   'round'
         14        SEND_VAL                                                     0.333333
         15        SEND_VAL                                                     2
         16        DO_ICALL                                             $6      
         17        ASSIGN                                                       !0, $6
   13    18        INIT_FCALL                                                   'var_dump'
         19        SEND_VAR                                                     !0
         20        INIT_FCALL                                                   'serialize'
         21        SEND_VAR                                                     !0
         22        DO_ICALL                                             $8      
         23        SEND_VAR                                                     $8
         24        DO_ICALL                                                     
         25      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
164.1 ms | 3306 KiB | 16 Q