3v4l.org

run code in 300+ PHP versions simultaneously
<?php $class = new Test; setlocale(LC_CTYPE, 'en_US.UTF-8'); $class->methodI(); setlocale(LC_CTYPE, 'tr_TR.UTF-8'); $class->methodI(); class Test { public function methodI() { echo setlocale(LC_CTYPE, 0) . PHP_EOL; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/19uJ2
function name:  (null)
number of ops:  16
compiled vars:  !0 = $class
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $1      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
    4     3        INIT_FCALL                                               'setlocale'
          4        SEND_VAL                                                 0
          5        SEND_VAL                                                 'en_US.UTF-8'
          6        DO_ICALL                                                 
    5     7        INIT_METHOD_CALL                                         !0, 'methodI'
          8        DO_FCALL                                      0          
    7     9        INIT_FCALL                                               'setlocale'
         10        SEND_VAL                                                 0
         11        SEND_VAL                                                 'tr_TR.UTF-8'
         12        DO_ICALL                                                 
    8    13        INIT_METHOD_CALL                                         !0, 'methodI'
         14        DO_FCALL                                      0          
   15    15      > RETURN                                                   1

Class Test:
Function methodi:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/19uJ2
function name:  methodI
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_FCALL                                               'setlocale'
          1        SEND_VAL                                                 0
          2        SEND_VAL                                                 0
          3        DO_ICALL                                         $0      
          4        CONCAT                                           ~1      $0, '%0A'
          5        ECHO                                                     ~1
   14     6      > RETURN                                                   null

End of function methodi

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.6 ms | 1395 KiB | 15 Q