3v4l.org

run code in 300+ PHP versions simultaneously
<?php function VS($x, $y) { var_dump($x === $y); if ($x !== $y) { echo "Failed: $y\n"; echo "Got: $x\n"; var_dump(debug_backtrace()); } } function VERIFY($x) { VS($x != false, true); } ////////////////////////////////////////////////////////////////////// imagedestroy($invalid_res); VERIFY(!is_object(null)); VERIFY(!is_object(123)); VERIFY(!is_object("test")); VERIFY(!is_object(array(123))); VERIFY(is_object(new stdclass)); { $v = unserialize("O:8:\"stdClass\":1:{s:4:\"name\";s:5:\"value\";}"); VERIFY(is_object($v)); } { $v = unserialize("O:8:\"stdClass\":1:{s:7:\"\0*\0name\";s:5:\"value\";}"); VERIFY(is_object($v)); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VP70c
function name:  (null)
number of ops:  46
compiled vars:  !0 = $invalid_res, !1 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL_BY_NAME                                       'imagedestroy'
          1        SEND_VAR_EX                                              !0
          2        DO_FCALL                                      0          
   14     3        INIT_FCALL                                               'verify'
          4        TYPE_CHECK                                  256  ~3      null
          5        BOOL_NOT                                         ~4      ~3
          6        SEND_VAL                                                 ~4
          7        DO_FCALL                                      0          
   15     8        INIT_FCALL                                               'verify'
          9        TYPE_CHECK                                  256  ~6      123
         10        BOOL_NOT                                         ~7      ~6
         11        SEND_VAL                                                 ~7
         12        DO_FCALL                                      0          
   16    13        INIT_FCALL                                               'verify'
         14        TYPE_CHECK                                  256  ~9      'test'
         15        BOOL_NOT                                         ~10     ~9
         16        SEND_VAL                                                 ~10
         17        DO_FCALL                                      0          
   17    18        INIT_FCALL                                               'verify'
         19        TYPE_CHECK                                  256  ~12     <array>
         20        BOOL_NOT                                         ~13     ~12
         21        SEND_VAL                                                 ~13
         22        DO_FCALL                                      0          
   18    23        INIT_FCALL                                               'verify'
         24        NEW                                              $15     'stdclass'
         25        DO_FCALL                                      0          
         26        TYPE_CHECK                                  256  ~17     $15
         27        SEND_VAL                                                 ~17
         28        DO_FCALL                                      0          
   22    29        INIT_FCALL                                               'unserialize'
         30        SEND_VAL                                                 'O%3A8%3A%22stdClass%22%3A1%3A%7Bs%3A4%3A%22name%22%3Bs%3A5%3A%22value%22%3B%7D'
         31        DO_ICALL                                         $19     
         32        ASSIGN                                                   !1, $19
   23    33        INIT_FCALL                                               'verify'
         34        TYPE_CHECK                                  256  ~21     !1
         35        SEND_VAL                                                 ~21
         36        DO_FCALL                                      0          
   26    37        INIT_FCALL                                               'unserialize'
         38        SEND_VAL                                                 'O%3A8%3A%22stdClass%22%3A1%3A%7Bs%3A7%3A%22%00%2A%00name%22%3Bs%3A5%3A%22value%22%3B%7D'
         39        DO_ICALL                                         $23     
         40        ASSIGN                                                   !1, $23
   27    41        INIT_FCALL                                               'verify'
         42        TYPE_CHECK                                  256  ~25     !1
         43        SEND_VAL                                                 ~25
         44        DO_FCALL                                      0          
   28    45      > RETURN                                                   1

Function vs:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 21
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/VP70c
function name:  VS
number of ops:  22
compiled vars:  !0 = $x, !1 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        INIT_FCALL                                               'var_dump'
          3        IS_IDENTICAL                                     ~2      !0, !1
          4        SEND_VAL                                                 ~2
          5        DO_ICALL                                                 
    5     6        IS_NOT_IDENTICAL                                         !0, !1
          7      > JMPZ                                                     ~4, ->21
          8    >   ROPE_INIT                                     3  ~6      'Failed%3A+'
          9        ROPE_ADD                                      1  ~6      ~6, !1
         10        ROPE_END                                      2  ~5      ~6, '%0A'
         11        ECHO                                                     ~5
         12        ROPE_INIT                                     3  ~9      'Got%3A+'
         13        ROPE_ADD                                      1  ~9      ~9, !0
         14        ROPE_END                                      2  ~8      ~9, '%0A'
         15        ECHO                                                     ~8
    6    16        INIT_FCALL                                               'var_dump'
         17        INIT_FCALL                                               'debug_backtrace'
         18        DO_ICALL                                         $11     
         19        SEND_VAR                                                 $11
         20        DO_ICALL                                                 
    7    21    > > RETURN                                                   null

End of function vs

Function verify:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VP70c
function name:  VERIFY
number of ops:  7
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
          1        INIT_FCALL                                               'vs'
          2        BOOL                                             ~1      !0
          3        SEND_VAL                                                 ~1
          4        SEND_VAL                                                 <true>
          5        DO_FCALL                                      0          
          6      > RETURN                                                   null

End of function verify

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.62 ms | 948 KiB | 28 Q