3v4l.org

run code in 300+ PHP versions simultaneously
<?php #### Option 1: Restricted type values // booleans $a = false; ++$a; // bool(true) ++$a; // bool(true) $a = true; --$a; // bool(false) --$a; // bool(false) // null values $a = null; --$a; // null $a = null; ++$a; // null // empty strings $a = ''; ++$a; // int(1) #### Option 2: Integer values // booleans $a = false; ++$a; // bool(true) ++$a; // int(2) $a = true; --$a; // bool(false) --$a; // int(-1) // null values $a = null; --$a; // int(-1) $a = null; ++$a; // int(1) #### non-numeric strings $a = '12d9'; ++$a; // string(4) "12e0" + Notice: String increment is deprecated, use str_inc() instead in php shell code on line 1 echo $a; ++$a; // float(13) echo $a;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MQZIs
function name:  (null)
number of ops:  28
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ASSIGN                                                   !0, <false>
    7     1        PRE_INC                                                  !0
    8     2        PRE_INC                                                  !0
    9     3        ASSIGN                                                   !0, <true>
   10     4        PRE_DEC                                                  !0
   11     5        PRE_DEC                                                  !0
   14     6        ASSIGN                                                   !0, null
          7        PRE_DEC                                                  !0
   15     8        ASSIGN                                                   !0, null
          9        PRE_INC                                                  !0
   18    10        ASSIGN                                                   !0, ''
         11        PRE_INC                                                  !0
   23    12        ASSIGN                                                   !0, <false>
   24    13        PRE_INC                                                  !0
   25    14        PRE_INC                                                  !0
   26    15        ASSIGN                                                   !0, <true>
   27    16        PRE_DEC                                                  !0
   28    17        PRE_DEC                                                  !0
   31    18        ASSIGN                                                   !0, null
         19        PRE_DEC                                                  !0
   32    20        ASSIGN                                                   !0, null
         21        PRE_INC                                                  !0
   35    22        ASSIGN                                                   !0, '12d9'
   36    23        PRE_INC                                                  !0
   37    24        ECHO                                                     !0
   39    25        PRE_INC                                                  !0
   40    26        ECHO                                                     !0
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.39 ms | 1394 KiB | 13 Q