3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(intval(-1)); $n=sprintf('%u',-1); var_dump(intval($n)); var_dump($n); var_dump((int)($n)); var_dump((int)($n+0));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/daLZB
function name:  (null)
number of ops:  26
compiled vars:  !0 = $n
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'var_dump'
          1        CAST                                          4  ~1      -1
          2        SEND_VAL                                                 ~1
          3        DO_ICALL                                                 
    3     4        INIT_FCALL                                               'sprintf'
          5        SEND_VAL                                                 '%25u'
          6        SEND_VAL                                                 -1
          7        DO_ICALL                                         $3      
          8        ASSIGN                                                   !0, $3
    4     9        INIT_FCALL                                               'var_dump'
         10        CAST                                          4  ~5      !0
         11        SEND_VAL                                                 ~5
         12        DO_ICALL                                                 
    5    13        INIT_FCALL                                               'var_dump'
         14        SEND_VAR                                                 !0
         15        DO_ICALL                                                 
    6    16        INIT_FCALL                                               'var_dump'
         17        CAST                                          4  ~8      !0
         18        SEND_VAL                                                 ~8
         19        DO_ICALL                                                 
    7    20        INIT_FCALL                                               'var_dump'
         21        ADD                                              ~10     !0, 0
         22        CAST                                          4  ~11     ~10
         23        SEND_VAL                                                 ~11
         24        DO_ICALL                                                 
         25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.07 ms | 1395 KiB | 17 Q