3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test{function __construct(){$a=array('I','n','i','t','i','a','t','i','n','g',' ','o','n','e',' ','l','i','n','e',' ','c','l','a','s','s','.','.','.','<','b','r',' ','/','>');foreach($a as $b){echo$b;}}function __destruct(){$a=array('<','b','r',' ','/','>','D','e','s','t','r','o','y','i','n','g',' ','t','h','e',' ','c','l','a','s','s','.','.','.');foreach($a as $b){echo$b;}}function testing(){$a=array('T','h','i','s',' ','i','s',' ','a','n',' ','f','u','n','c','t','i','o','n',' ','i','n',' ','t','h','e',' ','o','n','e',' ','l','i','n','e',' ','c','l','a','s','s','.','5','+','5','=','0');$c=0;$d=0;foreach($a as $b){if(is_numeric($b)){if($c==0){$c=$b;echo$b;}elseif($d==0){$d=$b;echo$b;}else{echo($c+$d);}}else{echo$b;}}}}$test=new Test();$test->testing();unset($test);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/p8b3Q
function name:  (null)
number of ops:  7
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   NEW                                              $1      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
          3        INIT_METHOD_CALL                                         !0, 'testing'
          4        DO_FCALL                                      0          
          5        UNSET_CV                                                 !0
          6      > RETURN                                                   1

Class Test:
Function __construct:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 5
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 5
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
filename:       /in/p8b3Q
function name:  __construct
number of ops:  7
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
          0  E >   ASSIGN                                                   !0, <array>
          1      > FE_RESET_R                                       $3      !0, ->5
          2    > > FE_FETCH_R                                               $3, !1, ->5
          3    >   ECHO                                                     !1
          4      > JMP                                                      ->2
          5    >   FE_FREE                                                  $3
          6      > RETURN                                                   null

End of function __construct

Function __destruct:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 5
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 5
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
filename:       /in/p8b3Q
function name:  __destruct
number of ops:  7
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
          0  E >   ASSIGN                                                   !0, <array>
          1      > FE_RESET_R                                       $3      !0, ->5
          2    > > FE_FETCH_R                                               $3, !1, ->5
          3    >   ECHO                                                     !1
          4      > JMP                                                      ->2
          5    >   FE_FREE                                                  $3
          6      > RETURN                                                   null

End of function __destruct

Function testing:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 24
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 24
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 22
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 14
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 14
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 19
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
filename:       /in/p8b3Q
function name:  testing
number of ops:  26
compiled vars:  !0 = $a, !1 = $c, !2 = $d, !3 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
          0  E >   ASSIGN                                                   !0, <array>
          1        ASSIGN                                                   !1, 0
          2        ASSIGN                                                   !2, 0
          3      > FE_RESET_R                                       $7      !0, ->24
          4    > > FE_FETCH_R                                               $7, !3, ->24
          5    >   INIT_FCALL                                               'is_numeric'
          6        SEND_VAR                                                 !3
          7        DO_ICALL                                         $8      
          8      > JMPZ                                                     $8, ->22
          9    >   IS_EQUAL                                                 !1, 0
         10      > JMPZ                                                     ~9, ->14
         11    >   ASSIGN                                                   !1, !3
         12        ECHO                                                     !3
         13      > JMP                                                      ->21
         14    >   IS_EQUAL                                                 !2, 0
         15      > JMPZ                                                     ~11, ->19
         16    >   ASSIGN                                                   !2, !3
         17        ECHO                                                     !3
         18      > JMP                                                      ->21
         19    >   ADD                                              ~13     !1, !2
         20        ECHO                                                     ~13
         21    > > JMP                                                      ->23
         22    >   ECHO                                                     !3
         23    > > JMP                                                      ->4
         24    >   FE_FREE                                                  $7
         25      > RETURN                                                   null

End of function testing

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.87 ms | 1392 KiB | 15 Q