3v4l.org

run code in 300+ PHP versions simultaneously
<?php class testCaseTrue { public function __toString() { return '1'; } } class testCaseFalse { public function __toString() { return '0'; } } $test_true = new testCaseTrue (); $test_false = new testCaseFalse (); echo $test_true ? 'test_true is true, ' : 'test_true is false, '; echo $test_false ? 'test_false is true ' : 'test_false is false ';
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 11
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 16
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 16
Branch analysis from position: 14
Branch analysis from position: 16
filename:       /in/SIdSr
function name:  (null)
number of ops:  19
compiled vars:  !0 = $test_true, !1 = $test_false
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   DECLARE_CLASS                                            'testcasetrue'
    8     1        DECLARE_CLASS                                            'testcasefalse'
   14     2        NEW                                              $2      'testCaseTrue'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $2
   15     5        NEW                                              $5      'testCaseFalse'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $5
   17     8      > JMPZ                                                     !0, ->11
          9    >   QM_ASSIGN                                        ~8      'test_true+is+true%2C+'
         10      > JMP                                                      ->12
         11    >   QM_ASSIGN                                        ~8      'test_true+is+false%2C+'
         12    >   ECHO                                                     ~8
   18    13      > JMPZ                                                     !1, ->16
         14    >   QM_ASSIGN                                        ~9      'test_false+is+true+'
         15      > JMP                                                      ->17
         16    >   QM_ASSIGN                                        ~9      'test_false+is+false+'
         17    >   ECHO                                                     ~9
         18      > RETURN                                                   1

Class testCaseTrue:
Function __tostring:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SIdSr
function name:  __toString
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E > > RETURN                                                   '1'
    5     1*       VERIFY_RETURN_TYPE                                       
          2*     > RETURN                                                   null

End of function __tostring

End of class testCaseTrue.

Class testCaseFalse:
Function __tostring:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SIdSr
function name:  __toString
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E > > RETURN                                                   '0'
   11     1*       VERIFY_RETURN_TYPE                                       
          2*     > RETURN                                                   null

End of function __tostring

End of class testCaseFalse.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.64 ms | 1399 KiB | 13 Q