3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(intval('0777')); var_dump(intval('777')); var_dump('----------------------'); var_dump(intval('0777', 0)); var_dump(intval('777', 0)); var_dump('----------------------'); var_dump(intval('0777', 8)); var_dump(intval('777', 8)); var_dump('----------------------'); var_dump(intval(0777, 8)); var_dump(intval(777, 8)); var_dump('----------------------'); var_dump(intval((string)0777, 8)); var_dump(intval((string)777, 8)); var_dump('done.');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iMWXg
function name:  (null)
number of ops:  82
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'var_dump'
          1        CAST                                          4  ~0      '0777'
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                                 
    4     4        INIT_FCALL                                               'var_dump'
          5        CAST                                          4  ~2      '777'
          6        SEND_VAL                                                 ~2
          7        DO_ICALL                                                 
    5     8        INIT_FCALL                                               'var_dump'
          9        SEND_VAL                                                 '----------------------'
         10        DO_ICALL                                                 
    7    11        INIT_FCALL                                               'var_dump'
         12        INIT_FCALL                                               'intval'
         13        SEND_VAL                                                 '0777'
         14        SEND_VAL                                                 0
         15        DO_ICALL                                         $5      
         16        SEND_VAR                                                 $5
         17        DO_ICALL                                                 
    8    18        INIT_FCALL                                               'var_dump'
         19        INIT_FCALL                                               'intval'
         20        SEND_VAL                                                 '777'
         21        SEND_VAL                                                 0
         22        DO_ICALL                                         $7      
         23        SEND_VAR                                                 $7
         24        DO_ICALL                                                 
    9    25        INIT_FCALL                                               'var_dump'
         26        SEND_VAL                                                 '----------------------'
         27        DO_ICALL                                                 
   11    28        INIT_FCALL                                               'var_dump'
         29        INIT_FCALL                                               'intval'
         30        SEND_VAL                                                 '0777'
         31        SEND_VAL                                                 8
         32        DO_ICALL                                         $10     
         33        SEND_VAR                                                 $10
         34        DO_ICALL                                                 
   12    35        INIT_FCALL                                               'var_dump'
         36        INIT_FCALL                                               'intval'
         37        SEND_VAL                                                 '777'
         38        SEND_VAL                                                 8
         39        DO_ICALL                                         $12     
         40        SEND_VAR                                                 $12
         41        DO_ICALL                                                 
   13    42        INIT_FCALL                                               'var_dump'
         43        SEND_VAL                                                 '----------------------'
         44        DO_ICALL                                                 
   15    45        INIT_FCALL                                               'var_dump'
         46        INIT_FCALL                                               'intval'
         47        SEND_VAL                                                 511
         48        SEND_VAL                                                 8
         49        DO_ICALL                                         $15     
         50        SEND_VAR                                                 $15
         51        DO_ICALL                                                 
   16    52        INIT_FCALL                                               'var_dump'
         53        INIT_FCALL                                               'intval'
         54        SEND_VAL                                                 777
         55        SEND_VAL                                                 8
         56        DO_ICALL                                         $17     
         57        SEND_VAR                                                 $17
         58        DO_ICALL                                                 
   17    59        INIT_FCALL                                               'var_dump'
         60        SEND_VAL                                                 '----------------------'
         61        DO_ICALL                                                 
   19    62        INIT_FCALL                                               'var_dump'
         63        INIT_FCALL                                               'intval'
         64        CAST                                          6  ~20     511
         65        SEND_VAL                                                 ~20
         66        SEND_VAL                                                 8
         67        DO_ICALL                                         $21     
         68        SEND_VAR                                                 $21
         69        DO_ICALL                                                 
   20    70        INIT_FCALL                                               'var_dump'
         71        INIT_FCALL                                               'intval'
         72        CAST                                          6  ~23     777
         73        SEND_VAL                                                 ~23
         74        SEND_VAL                                                 8
         75        DO_ICALL                                         $24     
         76        SEND_VAR                                                 $24
         77        DO_ICALL                                                 
   22    78        INIT_FCALL                                               'var_dump'
         79        SEND_VAL                                                 'done.'
         80        DO_ICALL                                                 
         81      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.83 ms | 1400 KiB | 17 Q