3v4l.org

run code in 300+ PHP versions simultaneously
<?php setlocale(LC_COLLATE, 'de_DE.UTF-8', 'de_DE@euro', 'de_DE', 'deu_deu'); function test($a, $b) { if (version_compare(PHP_VERSION, '7.0', '>=')) { return $a <=> $b; } return strcoll($a, $b); } test('a', 'b');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rENq5
function name:  (null)
number of ops:  12
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'setlocale'
          1        SEND_VAL                                                 3
          2        SEND_VAL                                                 'de_DE.UTF-8'
          3        SEND_VAL                                                 'de_DE%40euro'
          4        SEND_VAL                                                 'de_DE'
          5        SEND_VAL                                                 'deu_deu'
          6        DO_ICALL                                                 
   12     7        INIT_FCALL                                               'test'
          8        SEND_VAL                                                 'a'
          9        SEND_VAL                                                 'b'
         10        DO_FCALL                                      0          
         11      > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rENq5
function name:  test
number of ops:  16
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    6     2        INIT_FCALL                                               'version_compare'
          3        SEND_VAL                                                 '8.0.0'
          4        SEND_VAL                                                 '7.0'
          5        SEND_VAL                                                 '%3E%3D'
          6        DO_ICALL                                         $2      
          7      > JMPZ                                                     $2, ->10
    7     8    >   SPACESHIP                                        ~3      !0, !1
          9      > RETURN                                                   ~3
    9    10    >   INIT_FCALL                                               'strcoll'
         11        SEND_VAR                                                 !0
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                         $4      
         14      > RETURN                                                   $4
   10    15*     > RETURN                                                   null

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.26 ms | 1399 KiB | 20 Q