3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php mb_internal_encoding("UTF-8"); /* $s="ó12345678\r\n1234\n;"; //$s=utf8_encode("ó12345678\r\n1234\n;") // "ó12345678rn1234n;" // 012345678901234567890 print_r(mb_detect_encoding($s)."\n"); print_r(mb_strlen($s)."\n"); print_r(mb_strpos($s,';')."\n"); */ $linePart="abszolúte A_ADV ADV,;"; for ($i=0;$i<strlen($linePart);$i++) { print $i . "\t" . dechex(ord($linePart[$i])) . "\t" . $linePart[$i] . PHP_EOL; } print 'orig linePart length: '; var_dump(mb_strlen($linePart)); print 'orig linePart: '; var_dump($linePart); print '; pos: '; var_dump(mb_strpos($linePart, ';'));
Output for 4.3.10 - 4.4.9, 5.0.2 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
0 61 a 1 62 b 2 73 s 3 7a z 4 6f o 5 6c l 6 c3 � 7 ba � 8 74 t 9 65 e 10 9 11 41 A 12 5f _ 13 41 A 14 44 D 15 56 V 16 9 17 41 A 18 44 D 19 56 V 20 2c , 21 3b ; orig linePart length: int(21) orig linePart: string(22) "abszolúte A_ADV ADV,;" ; pos: int(20)
Output for hhvm-3.10.0

Process exited with code 153.
Output for 4.3.0 - 4.3.9, 5.0.0 - 5.0.1
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/rPPAU on line 15 0 61 aPHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/rPPAU on line 15 1 62 bPHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/rPPAU on line 15 2 73 sPHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/rPPAU on line 15 3 7a zPHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/rPPAU on line 15 4 6f oPHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/rPPAU on line 15 5 6c lPHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/rPPAU on line 15 6 c3 �PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/rPPAU on line 15 7 ba �PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/rPPAU on line 15 8 74 tPHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/rPPAU on line 15 9 65 ePHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/rPPAU on line 15 10 9 PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/rPPAU on line 15 11 41 APHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/rPPAU on line 15 12 5f _PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/rPPAU on line 15 13 41 APHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/rPPAU on line 15 14 44 DPHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/rPPAU on line 15 15 56 VPHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/rPPAU on line 15 16 9 PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/rPPAU on line 15 17 41 APHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/rPPAU on line 15 18 44 DPHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/rPPAU on line 15 19 56 VPHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/rPPAU on line 15 20 2c ,PHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/rPPAU on line 15 21 3b ;PHP_EOLorig linePart length: int(21) orig linePart: string(22) "abszolúte A_ADV ADV,;" ; pos: int(20)