3v4l.org

run code in 300+ PHP versions simultaneously
<?php function var2int($a) { $a--; $a++; return (int) $a; } echo var2int("a")."\n"; echo var2int("?")."\n"; echo var2int(5)."\n"; echo var2int(NULL)."\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8IC11
function name:  (null)
number of ops:  21
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_FCALL                                               'var2int'
          1        SEND_VAL                                                 'a'
          2        DO_FCALL                                      0  $0      
          3        CONCAT                                           ~1      $0, '%0A'
          4        ECHO                                                     ~1
   11     5        INIT_FCALL                                               'var2int'
          6        SEND_VAL                                                 '%3F'
          7        DO_FCALL                                      0  $2      
          8        CONCAT                                           ~3      $2, '%0A'
          9        ECHO                                                     ~3
   12    10        INIT_FCALL                                               'var2int'
         11        SEND_VAL                                                 5
         12        DO_FCALL                                      0  $4      
         13        CONCAT                                           ~5      $4, '%0A'
         14        ECHO                                                     ~5
   13    15        INIT_FCALL                                               'var2int'
         16        SEND_VAL                                                 null
         17        DO_FCALL                                      0  $6      
         18        CONCAT                                           ~7      $6, '%0A'
         19        ECHO                                                     ~7
         20      > RETURN                                                   1

Function var2int:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8IC11
function name:  var2int
number of ops:  6
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        PRE_DEC                                                  !0
    6     2        PRE_INC                                                  !0
    7     3        CAST                                          4  ~3      !0
          4      > RETURN                                                   ~3
    8     5*     > RETURN                                                   null

End of function var2int

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.98 ms | 1389 KiB | 17 Q