3v4l.org

run code in 300+ PHP versions simultaneously
<?php $collator = new Collator('ru'); $str1 = intval(true).$collator->getSortKey('Abc'); $str2 = intval(true).$collator->getSortKey('Абв'); print_r(strcmp($str1, $str2));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eoqHW
function name:  (null)
number of ops:  24
compiled vars:  !0 = $collator, !1 = $str1, !2 = $str2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $3      'Collator'
          1        SEND_VAL_EX                                              'ru'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $3
    5     4        CAST                                          4  ~6      <true>
          5        INIT_METHOD_CALL                                         !0, 'getSortKey'
          6        SEND_VAL_EX                                              'Abc'
          7        DO_FCALL                                      0  $7      
          8        CONCAT                                           ~8      ~6, $7
          9        ASSIGN                                                   !1, ~8
    6    10        CAST                                          4  ~10     <true>
         11        INIT_METHOD_CALL                                         !0, 'getSortKey'
         12        SEND_VAL_EX                                              '%D0%90%D0%B1%D0%B2'
         13        DO_FCALL                                      0  $11     
         14        CONCAT                                           ~12     ~10, $11
         15        ASSIGN                                                   !2, ~12
    8    16        INIT_FCALL                                               'print_r'
         17        INIT_FCALL                                               'strcmp'
         18        SEND_VAR                                                 !1
         19        SEND_VAR                                                 !2
         20        DO_ICALL                                         $14     
         21        SEND_VAR                                                 $14
         22        DO_ICALL                                                 
         23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
206.57 ms | 1395 KiB | 17 Q