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 (string)$test_true ? 'test_true is true, ' : 'test_true is false, '; echo (string)$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 = 10, Position 2 = 12
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 18
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 18
Branch analysis from position: 16
Branch analysis from position: 18
filename:       /in/okJHT
function name:  (null)
number of ops:  21
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        CAST                                          6  ~8      !0
          9      > JMPZ                                                     ~8, ->12
         10    >   QM_ASSIGN                                        ~9      'test_true+is+true%2C+'
         11      > JMP                                                      ->13
         12    >   QM_ASSIGN                                        ~9      'test_true+is+false%2C+'
         13    >   ECHO                                                     ~9
   18    14        CAST                                          6  ~10     !1
         15      > JMPZ                                                     ~10, ->18
         16    >   QM_ASSIGN                                        ~11     'test_false+is+true+'
         17      > JMP                                                      ->19
         18    >   QM_ASSIGN                                        ~11     'test_false+is+false+'
         19    >   ECHO                                                     ~11
         20      > RETURN                                                   1

Class testCaseTrue:
Function __tostring:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/okJHT
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/okJHT
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:
157.57 ms | 1399 KiB | 13 Q