3v4l.org

run code in 300+ PHP versions simultaneously
<?php // https://bugs.php.net/bug.php?id=18556 // Set language to desired language $g_lang = 'tr_TR.UTF-8'; putenv("LANG=$g_lang"); if (setlocale(LC_ALL, $g_lang) === false) { throw new Exception('Setting locale failed.'); } class InfoBlob { public $foo; function InfoBlob() { $this->foo = "Foo"; } } echo ('Instantiating an infoBlob with a lowercase i<br>'); $foobar = new infoBlob(); echo ($foobar->foo); echo ('<br>Instantiating an InfoBlob with an uppercase I<br>'); $foobar = new InfoBlob(); echo ($foobar->foo);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 16
Branch analysis from position: 12
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sLMLF
function name:  (null)
number of ops:  29
compiled vars:  !0 = $g_lang, !1 = $foobar
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   6     0  E >   QM_ASSIGN                                                !0
   7     1        INIT_FCALL                                               'putenv'
         2        NOP                                                      
         3        FAST_CONCAT                                      ~3      'LANG%3D', !0
         4        SEND_VAL                                                 ~3
         5        DO_ICALL                                                 
   9     6        INIT_FCALL                                               'setlocale'
         7        SEND_VAL                                                 6
         8        SEND_VAR                                                 !0
         9        DO_ICALL                                         $5      
        10        IS_NOT_IDENTICAL                                 ~6      $5, <false>
        11      > JMPZ                                                     ~6, ->16
  11    12    >   NEW                                              $7      :35
        13        SEND_VAL_EX                                              'Setting+locale+failed.'
        14        DO_FCALL                                      0          
        15      > THROW                                         0          $7
  21    16    >   ASSIGN_OBJ                                               'Instantiating+an+infoBlob+with+a+lowercase+i%3Cbr%3E'
  22    17        NEW                                              $9      :29
        18        DO_FCALL                                      0          
        19        QM_ASSIGN                                                !1
  23    20        FETCH_OBJ_R                                      ~12     !1, 'foo'
        21        ASSIGN_OBJ                                               ~12
  24    22        ASSIGN_OBJ                                               '%3Cbr%3EInstantiating+an+InfoBlob+with+an+uppercase+I%3Cbr%3E'
  25    23        NEW                                              $13     :21
        24        DO_FCALL                                      0          
        25        QM_ASSIGN                                                !1
  26    26        FETCH_OBJ_R                                      ~16     !1, 'foo'
        27        ASSIGN_OBJ                                               ~16
        28      > RETURN                                                   1

Class InfoBlob:
Function infoblob:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sLMLF
function name:  InfoBlob
number of ops:  3
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  17     0  E >   ASSIGN_SUB                                    0          'foo'
         1        OP_DATA                                                  'Foo'
  18     2      > RETURN                                                   null

End of function infoblob

End of class InfoBlob.

Generated using Vulcan Logic Dumper, using php 7.4.0