3v4l.org

run code in 300+ PHP versions simultaneously
<?php usort(array('a', 'b', 'c', 'd'), 'some_sort_function'); function some_sort_function($a, $b) { static $foo = NULL; if ($foo === NULL) { $foo = 'bar'; echo "just once?\n"; } return 0; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ng8JL
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'usort'
          1        SEND_VAL_EX                                              <array>
          2        SEND_VAL                                                 'some_sort_function'
          3        DO_ICALL                                                 
   14     4      > RETURN                                                   1

Function some_sort_function:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/Ng8JL
function name:  some_sort_function
number of ops:  9
compiled vars:  !0 = $a, !1 = $b, !2 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    6     2        BIND_STATIC                                              !2
    8     3        TYPE_CHECK                                    2          !2
          4      > JMPZ                                                     ~3, ->7
    9     5    >   ASSIGN                                                   !2, 'bar'
   10     6        ECHO                                                     'just+once%3F%0A'
   13     7    > > RETURN                                                   0
   14     8*     > RETURN                                                   null

End of function some_sort_function

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.48 ms | 1395 KiB | 15 Q