3v4l.org

run code in 300+ PHP versions simultaneously
<?php class test { public static function ttt() { echo "test"; } } register_shutdown_function(function () { $lastError = error_get_last(); if (!empty($lastError)) { test::ttt(); } else { echo "test2"; } });
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9aWKm
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'register_shutdown_function'
          1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F9aWKm%3A9%240'
   16     2        SEND_VAL                                                 ~0
          3        DO_ICALL                                                 
          4      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F9aWKm%3A9%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 9
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9aWKm
function name:  {closure}
number of ops:  11
compiled vars:  !0 = $lastError
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_FCALL                                               'error_get_last'
          1        DO_ICALL                                         $1      
          2        ASSIGN                                                   !0, $1
   11     3        ISSET_ISEMPTY_CV                                 ~3      !0
          4        BOOL_NOT                                         ~4      ~3
          5      > JMPZ                                                     ~4, ->9
   12     6    >   INIT_STATIC_METHOD_CALL                                  'test', 'ttt'
          7        DO_FCALL                                      0          
          8      > JMP                                                      ->10
   14     9    >   ECHO                                                     'test2'
   16    10    > > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F9aWKm%3A9%240

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

End of function ttt

End of class test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.92 ms | 1395 KiB | 17 Q