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.iso8859-9'; putenv("LANG=$g_lang"); $newLocale = setlocale(LC_ALL, $g_lang); if ($newLocale === false) { throw new Exception('Setting locale failed.'); } var_dump($newLocale); 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 = 13, Position 2 = 17
Branch analysis from position: 13
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sHfZ8
function name:  (null)
number of ops:  33
compiled vars:  !0 = $g_lang, !1 = $newLocale, !2 = $foobar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ASSIGN                                                   !0, 'tr_TR.iso8859-9'
    7     1        INIT_FCALL                                               'putenv'
          2        NOP                                                      
          3        FAST_CONCAT                                      ~4      'LANG%3D', !0
          4        SEND_VAL                                                 ~4
          5        DO_ICALL                                                 
    9     6        INIT_FCALL                                               'setlocale'
          7        SEND_VAL                                                 6
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $6      
         10        ASSIGN                                                   !1, $6
   10    11        TYPE_CHECK                                    4          !1
         12      > JMPZ                                                     ~8, ->17
   12    13    >   NEW                                              $9      'Exception'
         14        SEND_VAL_EX                                              'Setting+locale+failed.'
         15        DO_FCALL                                      0          
         16      > THROW                                         0          $9
   15    17    >   INIT_FCALL                                               'var_dump'
         18        SEND_VAR                                                 !1
         19        DO_ICALL                                                 
   24    20        ECHO                                                     'Instantiating+an+infoBlob+with+a+lowercase+i%3Cbr%3E'
   25    21        NEW                                              $12     'infoBlob'
         22        DO_FCALL                                      0          
         23        ASSIGN                                                   !2, $12
   26    24        FETCH_OBJ_R                                      ~15     !2, 'foo'
         25        ECHO                                                     ~15
   27    26        ECHO                                                     '%3Cbr%3EInstantiating+an+InfoBlob+with+an+uppercase+I%3Cbr%3E'
   28    27        NEW                                              $16     'InfoBlob'
         28        DO_FCALL                                      0          
         29        ASSIGN                                                   !2, $16
   29    30        FETCH_OBJ_R                                      ~19     !2, 'foo'
         31        ECHO                                                     ~19
         32      > RETURN                                                   1

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

End of function infoblob

End of class InfoBlob.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.66 ms | 1400 KiB | 19 Q