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'; 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/MOO5Y
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 >   ASSIGN                                                   !0, 'tr_TR'
    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        TYPE_CHECK                                    4          $5
         11      > JMPZ                                                     ~6, ->16
   11    12    >   NEW                                              $7      'Exception'
         13        SEND_VAL_EX                                              'Setting+locale+failed.'
         14        DO_FCALL                                      0          
         15      > THROW                                         0          $7
   21    16    >   ECHO                                                     'Instantiating+an+infoBlob+with+a+lowercase+i%3Cbr%3E'
   22    17        NEW                                              $9      'infoBlob'
         18        DO_FCALL                                      0          
         19        ASSIGN                                                   !1, $9
   23    20        FETCH_OBJ_R                                      ~12     !1, 'foo'
         21        ECHO                                                     ~12
   24    22        ECHO                                                     '%3Cbr%3EInstantiating+an+InfoBlob+with+an+uppercase+I%3Cbr%3E'
   25    23        NEW                                              $13     'InfoBlob'
         24        DO_FCALL                                      0          
         25        ASSIGN                                                   !1, $13
   26    26        FETCH_OBJ_R                                      ~16     !1, 'foo'
         27        ECHO                                                     ~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/MOO5Y
function name:  InfoBlob
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   ASSIGN_OBJ                                               'foo'
          1        OP_DATA                                                  'Foo'
   18     2      > RETURN                                                   null

End of function infoblob

End of class InfoBlob.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.4 ms | 1384 KiB | 17 Q