3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { function bar() { $nothing = isset($this) ? 'Instance' : 'Class'; } } class Baz { function test() { $objDateTime = new DateTime('NOW'); echo 'Baz->test()::DEBUT: ' . $objDateTime->format('c').'<br />'; for($index=1; $index <10; $index++) { Foo::bar(); } $objDateTime = new DateTime('NOW'); echo 'Baz->test()::FIN: ' . $objDateTime->format('c').'<br />'; } } $baz = new Baz; $baz->test(); class FooPropre { public static function barPropre() { $nothing = isset($this) ? 'Instance' : 'Class'; } } class BazPropre { function testPropre() { $objDateTime = new DateTime('NOW'); echo 'BazPropre->testPropre()::DEBUT: ' . $objDateTime->format('c').'<br />'; for($index=1; $index <10; $index++) { FooPropre::barPropre(); } $objDateTime = new DateTime('NOW'); echo 'BazPropre->testPropre()::FIN: ' . $objDateTime->format('c').'<br />'; } } $baz = new BazPropre; $baz->testPropre();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0IFLC
function name:  (null)
number of ops:  11
compiled vars:  !0 = $baz
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   NEW                                              $1      'Baz'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   20     3        INIT_METHOD_CALL                                         !0, 'test'
          4        DO_FCALL                                      0          
   39     5        NEW                                              $5      'BazPropre'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !0, $5
   40     8        INIT_METHOD_CALL                                         !0, 'testPropre'
          9        DO_FCALL                                      0          
         10      > RETURN                                                   1

Class Foo:
Function bar:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 2, Position 2 = 4
Branch analysis from position: 2
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0IFLC
function name:  bar
number of ops:  7
compiled vars:  !0 = $nothing
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ISSET_ISEMPTY_THIS                               ~1      
          1      > JMPZ                                                     ~1, ->4
          2    >   QM_ASSIGN                                        ~2      'Instance'
          3      > JMP                                                      ->5
          4    >   QM_ASSIGN                                        ~2      'Class'
          5    >   ASSIGN                                                   !0, ~2
    5     6      > RETURN                                                   null

End of function bar

End of class Foo.

Class Baz:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 12
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 12
Branch analysis from position: 17
Branch analysis from position: 12
filename:       /in/0IFLC
function name:  test
number of ops:  28
compiled vars:  !0 = $objDateTime, !1 = $index
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $2      'DateTime'
          1        SEND_VAL_EX                                              'NOW'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
   10     4        INIT_METHOD_CALL                                         !0, 'format'
          5        SEND_VAL_EX                                              'c'
          6        DO_FCALL                                      0  $5      
          7        CONCAT                                           ~6      'Baz-%3Etest%28%29%3A%3ADEBUT%3A+', $5
          8        CONCAT                                           ~7      ~6, '%3Cbr+%2F%3E'
          9        ECHO                                                     ~7
   11    10        ASSIGN                                                   !1, 1
         11      > JMP                                                      ->15
   12    12    >   INIT_STATIC_METHOD_CALL                                  'Foo', 'bar'
         13        DO_FCALL                                      0          
   11    14        PRE_INC                                                  !1
         15    >   IS_SMALLER                                               !1, 10
         16      > JMPNZ                                                    ~11, ->12
   14    17    >   NEW                                              $12     'DateTime'
         18        SEND_VAL_EX                                              'NOW'
         19        DO_FCALL                                      0          
         20        ASSIGN                                                   !0, $12
   15    21        INIT_METHOD_CALL                                         !0, 'format'
         22        SEND_VAL_EX                                              'c'
         23        DO_FCALL                                      0  $15     
         24        CONCAT                                           ~16     'Baz-%3Etest%28%29%3A%3AFIN%3A+', $15
         25        CONCAT                                           ~17     ~16, '%3Cbr+%2F%3E'
         26        ECHO                                                     ~17
   16    27      > RETURN                                                   null

End of function test

End of class Baz.

Class FooPropre:
Function barpropre:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 2, Position 2 = 4
Branch analysis from position: 2
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0IFLC
function name:  barPropre
number of ops:  7
compiled vars:  !0 = $nothing
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   ISSET_ISEMPTY_THIS                               ~1      
          1      > JMPZ                                                     ~1, ->4
          2    >   QM_ASSIGN                                        ~2      'Instance'
          3      > JMP                                                      ->5
          4    >   QM_ASSIGN                                        ~2      'Class'
          5    >   ASSIGN                                                   !0, ~2
   25     6      > RETURN                                                   null

End of function barpropre

End of class FooPropre.

Class BazPropre:
Function testpropre:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 12
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 12
Branch analysis from position: 17
Branch analysis from position: 12
filename:       /in/0IFLC
function name:  testPropre
number of ops:  28
compiled vars:  !0 = $objDateTime, !1 = $index
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   29     0  E >   NEW                                              $2      'DateTime'
          1        SEND_VAL_EX                                              'NOW'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
   30     4        INIT_METHOD_CALL                                         !0, 'format'
          5        SEND_VAL_EX                                              'c'
          6        DO_FCALL                                      0  $5      
          7        CONCAT                                           ~6      'BazPropre-%3EtestPropre%28%29%3A%3ADEBUT%3A+', $5
          8        CONCAT                                           ~7      ~6, '%3Cbr+%2F%3E'
          9        ECHO                                                     ~7
   31    10        ASSIGN                                                   !1, 1
         11      > JMP                                                      ->15
   32    12    >   INIT_STATIC_METHOD_CALL                                  'FooPropre', 'barPropre'
         13        DO_FCALL                                      0          
   31    14        PRE_INC                                                  !1
         15    >   IS_SMALLER                                               !1, 10
         16      > JMPNZ                                                    ~11, ->12
   34    17    >   NEW                                              $12     'DateTime'
         18        SEND_VAL_EX                                              'NOW'
         19        DO_FCALL                                      0          
         20        ASSIGN                                                   !0, $12
   35    21        INIT_METHOD_CALL                                         !0, 'format'
         22        SEND_VAL_EX                                              'c'
         23        DO_FCALL                                      0  $15     
         24        CONCAT                                           ~16     'BazPropre-%3EtestPropre%28%29%3A%3AFIN%3A+', $15
         25        CONCAT                                           ~17     ~16, '%3Cbr+%2F%3E'
         26        ECHO                                                     ~17
   36    27      > RETURN                                                   null

End of function testpropre

End of class BazPropre.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.53 ms | 1403 KiB | 13 Q