3v4l.org

run code in 300+ PHP versions simultaneously
<?php class voEmail { const EMAIL = "me@where.com"; function getEmail(){ return self::EMAIL; } } class voEmaile { const EMAIL = "me@where.com"; function getEmail(){ return self::EMAIL; } } $vo = new voEmail; echo $vo->getEmail(),"\n"; $vo2 = new voEmaile; echo $vo == $vo2?'true':'false',"\n"; echo $vo === $vo2? 'true':'false',"\n"; echo $vo::EMAIL === $vo2::EMAIL? 'true':'false',"\n";
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 14
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 21
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
2 jumps found. (Code = 43) Position 1 = 30, Position 2 = 32
Branch analysis from position: 30
1 jumps found. (Code = 42) Position 1 = 33
Branch analysis from position: 33
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
2 jumps found. (Code = 43) Position 1 = 30, Position 2 = 32
Branch analysis from position: 30
Branch analysis from position: 32
Branch analysis from position: 14
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 21
Branch analysis from position: 19
Branch analysis from position: 21
filename:       /in/AqbdH
function name:  (null)
number of ops:  36
compiled vars:  !0 = $vo, !1 = $vo2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   NEW                                              $2      'voEmail'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   18     3        INIT_METHOD_CALL                                         !0, 'getEmail'
          4        DO_FCALL                                      0  $5      
          5        ECHO                                                     $5
          6        ECHO                                                     '%0A'
   19     7        NEW                                              $6      'voEmaile'
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !1, $6
   20    10        IS_EQUAL                                                 !0, !1
         11      > JMPZ                                                     ~9, ->14
         12    >   QM_ASSIGN                                        ~10     'true'
         13      > JMP                                                      ->15
         14    >   QM_ASSIGN                                        ~10     'false'
         15    >   ECHO                                                     ~10
         16        ECHO                                                     '%0A'
   21    17        IS_IDENTICAL                                             !0, !1
         18      > JMPZ                                                     ~11, ->21
         19    >   QM_ASSIGN                                        ~12     'true'
         20      > JMP                                                      ->22
         21    >   QM_ASSIGN                                        ~12     'false'
         22    >   ECHO                                                     ~12
         23        ECHO                                                     '%0A'
   22    24        FETCH_CLASS                                   0  $13     !0
         25        FETCH_CLASS_CONSTANT                             ~14     $13, 'EMAIL'
         26        FETCH_CLASS                                   0  $15     !1
         27        FETCH_CLASS_CONSTANT                             ~16     $15, 'EMAIL'
         28        IS_IDENTICAL                                             ~14, ~16
         29      > JMPZ                                                     ~17, ->32
         30    >   QM_ASSIGN                                        ~18     'true'
         31      > JMP                                                      ->33
         32    >   QM_ASSIGN                                        ~18     'false'
         33    >   ECHO                                                     ~18
         34        ECHO                                                     '%0A'
         35      > RETURN                                                   1

Class voEmail:
Function getemail:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AqbdH
function name:  getEmail
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E > > RETURN                                                   'me%40where.com'
    7     1*     > RETURN                                                   null

End of function getemail

End of class voEmail.

Class voEmaile:
Function getemail:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AqbdH
function name:  getEmail
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E > > RETURN                                                   'me%40where.com'
   14     1*     > RETURN                                                   null

End of function getemail

End of class voEmaile.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.48 ms | 1390 KiB | 13 Q