3v4l.org

run code in 300+ PHP versions simultaneously
<?php function isDiff($old, $new) { if ($old === null || is_string($old) && ($new === null || is_bool($new) || is_numeric($new)) && strcmp($old, $new) === 0) { return false; } return true; } var_dump(isDiff("05", 5)); var_dump(isDiff(5, 5.0)); var_dump(isDiff(true, 1));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4a1E4
function name:  (null)
number of ops:  22
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'isdiff'
          2        SEND_VAL                                                 '05'
          3        SEND_VAL                                                 5
          4        DO_FCALL                                      0  $0      
          5        SEND_VAR                                                 $0
          6        DO_ICALL                                                 
   10     7        INIT_FCALL                                               'var_dump'
          8        INIT_FCALL                                               'isdiff'
          9        SEND_VAL                                                 5
         10        SEND_VAL                                                 5
         11        DO_FCALL                                      0  $2      
         12        SEND_VAR                                                 $2
         13        DO_ICALL                                                 
   11    14        INIT_FCALL                                               'var_dump'
         15        INIT_FCALL                                               'isdiff'
         16        SEND_VAL                                                 <true>
         17        SEND_VAL                                                 1
         18        DO_FCALL                                      0  $4      
         19        SEND_VAR                                                 $4
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

Function isdiff:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 4, Position 2 = 24
Branch analysis from position: 4
2 jumps found. (Code = 46) Position 1 = 6, Position 2 = 16
Branch analysis from position: 6
2 jumps found. (Code = 47) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
2 jumps found. (Code = 47) Position 1 = 11, Position 2 = 15
Branch analysis from position: 11
2 jumps found. (Code = 46) Position 1 = 17, Position 2 = 23
Branch analysis from position: 17
2 jumps found. (Code = 43) Position 1 = 25, Position 2 = 26
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
Branch analysis from position: 15
Branch analysis from position: 10
Branch analysis from position: 16
Branch analysis from position: 24
filename:       /in/4a1E4
function name:  isDiff
number of ops:  28
compiled vars:  !0 = $old, !1 = $new
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        TYPE_CHECK                                    2  ~2      !0
          3      > JMPNZ_EX                                         ~2      ~2, ->24
          4    >   TYPE_CHECK                                   64  ~3      !0
          5      > JMPZ_EX                                          ~3      ~3, ->16
          6    >   TYPE_CHECK                                    2  ~4      !1
          7      > JMPNZ_EX                                         ~4      ~4, ->10
          8    >   TYPE_CHECK                                   12  ~5      !1
          9        BOOL                                             ~4      ~5
         10    > > JMPNZ_EX                                         ~4      ~4, ->15
         11    >   INIT_FCALL                                               'is_numeric'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                         $6      
         14        BOOL                                             ~4      $6
         15    >   BOOL                                             ~3      ~4
         16    > > JMPZ_EX                                          ~3      ~3, ->23
         17    >   INIT_FCALL                                               'strcmp'
         18        SEND_VAR                                                 !0
         19        SEND_VAR                                                 !1
         20        DO_ICALL                                         $7      
         21        IS_IDENTICAL                                     ~8      $7, 0
         22        BOOL                                             ~3      ~8
         23    >   BOOL                                             ~2      ~3
         24    > > JMPZ                                                     ~2, ->26
    5    25    > > RETURN                                                   <false>
    7    26    > > RETURN                                                   <true>
    8    27*     > RETURN                                                   null

End of function isdiff

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.64 ms | 1403 KiB | 22 Q