3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function dostuff() { echo 'mb_check_encoding: '; $st = microtime( true ); $ans = mb_check_encoding( "\xF4\x90\x80\x80", 'UTF-8' ); $et = microtime( true ); echo $et - $st, 's '; var_dump( $ans ); echo 'preg_match: '; $st = microtime( true ); $ans = preg_match( '//u', "\xF4\x90\x80\x80" ); echo $et - $st, 's '; var_dump( $ans ); } dostuff();
Output for 7.1.0
mb_check_encoding: 7.1525573730469E-6s bool(false) preg_match: -1.0013580322266E-5s bool(false)
Output for 5.5.6, 5.6.11, 5.6.21, 7.0.14
mb_check_encoding: 8.1062316894531E-6s bool(false) preg_match: -1.3828277587891E-5s bool(false)
Output for 5.5.34, 5.6.7, 7.0.9
mb_check_encoding: 8.1062316894531E-6s bool(false) preg_match: -1.0967254638672E-5s bool(false)
Output for 7.0.8
mb_check_encoding: 5.9604644775391E-6s bool(false) preg_match: -6.1988830566406E-6s bool(false)
Output for 7.0.7
mb_check_encoding: 1.2874603271484E-5s bool(false) preg_match: -1.1920928955078E-5s bool(false)
Output for 7.0.6
mb_check_encoding: 1.0967254638672E-5s bool(false) preg_match: -1.0013580322266E-5s bool(false)
Output for 7.0.5
mb_check_encoding: 8.1062316894531E-6s bool(false) preg_match: -7.8678131103516E-6s bool(false)
Output for 7.0.4
mb_check_encoding: 9.0599060058594E-6s bool(false) preg_match: -1.0967254638672E-5s bool(false)
Output for 7.0.3
mb_check_encoding: 8.8214874267578E-6s bool(false) preg_match: -1.4066696166992E-5s bool(false)
Output for 7.0.2
mb_check_encoding: 6.9141387939453E-6s bool(false) preg_match: -8.1062316894531E-6s bool(false)
Output for 5.5.7, 5.6.12, 7.0.1
mb_check_encoding: 8.1062316894531E-6s bool(false) preg_match: -1.0013580322266E-5s bool(false)
Output for 5.5.2, 5.5.20, 5.6.0, 7.0.0
mb_check_encoding: 9.0599060058594E-6s bool(false) preg_match: -1.1920928955078E-5s bool(false)
Output for hhvm-3.12.0
mb_check_encoding: 2.8848648071289E-5s bool(false) preg_match: -2.5033950805664E-5s bool(false)
Output for hhvm-3.10.0
mb_check_encoding: 2.7179718017578E-5s bool(false) preg_match: -1.8835067749023E-5s bool(false)
Output for 5.6.28
mb_check_encoding: 8.1062316894531E-6s bool(false) preg_match: -3.6954879760742E-5s bool(false)
Output for 5.6.23
mb_check_encoding: 5.9604644775391E-6s bool(false) preg_match: -1.0013580322266E-5s bool(false)
Output for 5.6.22
mb_check_encoding: 1.0013580322266E-5s bool(false) preg_match: -1.7166137695312E-5s bool(false)
Output for 5.4.19, 5.6.20
mb_check_encoding: 6.1988830566406E-6s bool(false) preg_match: -1.0967254638672E-5s bool(false)
Output for 5.5.8, 5.6.19
mb_check_encoding: 1.0013580322266E-5s bool(false) preg_match: -1.5974044799805E-5s bool(false)
Output for 5.5.16, 5.5.35, 5.6.1, 5.6.18
mb_check_encoding: 7.1525573730469E-6s bool(false) preg_match: -1.0967254638672E-5s bool(false)
Output for 5.4.38, 5.6.2, 5.6.17
mb_check_encoding: 6.9141387939453E-6s bool(false) preg_match: -1.3113021850586E-5s bool(false)
Output for 5.5.0, 5.5.10, 5.5.18, 5.6.16
mb_check_encoding: 8.1062316894531E-6s bool(false) preg_match: -1.2874603271484E-5s bool(false)
Output for 5.4.2, 5.6.15
mb_check_encoding: 9.0599060058594E-6s bool(false) preg_match: -1.5974044799805E-5s bool(false)
Output for 5.5.13, 5.6.14
mb_check_encoding: 7.8678131103516E-6s bool(false) preg_match: -1.3113021850586E-5s bool(false)
Output for 5.6.13
mb_check_encoding: 6.9141387939453E-6s bool(false) preg_match: -1.1205673217773E-5s bool(false)
Output for 5.5.22, 5.5.25, 5.6.10
mb_check_encoding: 8.1062316894531E-6s bool(false) preg_match: -1.1920928955078E-5s bool(false)
Output for 5.5.28, 5.6.9
mb_check_encoding: 6.9141387939453E-6s bool(false) preg_match: -1.0013580322266E-5s bool(false)
Output for 5.6.8
mb_check_encoding: 6.1988830566406E-6s bool(false) preg_match: -1.0013580322266E-5s bool(false)
Output for 5.6.6
mb_check_encoding: 9.7751617431641E-6s bool(false) preg_match: -1.8119812011719E-5s bool(false)
Output for 5.6.5
mb_check_encoding: 6.9141387939453E-6s bool(false) preg_match: -1.215934753418E-5s bool(false)
Output for 5.6.4
mb_check_encoding: 1.0967254638672E-5s bool(false) preg_match: -1.7166137695312E-5s bool(false)
Output for 5.5.15, 5.6.3
mb_check_encoding: 6.9141387939453E-6s bool(false) preg_match: -9.0599060058594E-6s bool(false)
Output for 5.5.37
mb_check_encoding: 5.0067901611328E-6s bool(false) preg_match: -8.1062316894531E-6s bool(false)
Output for 5.5.36
mb_check_encoding: 6.1988830566406E-6s bool(false) preg_match: -8.8214874267578E-6s bool(false)
Output for 5.5.33
mb_check_encoding: 8.8214874267578E-6s bool(false) preg_match: -1.5020370483398E-5s bool(false)
Output for 5.5.32
mb_check_encoding: 7.8678131103516E-6s bool(false) preg_match: -1.0967254638672E-5s bool(false)
Output for 5.5.4, 5.5.26, 5.5.31
mb_check_encoding: 6.9141387939453E-6s bool(false) preg_match: -1.0967254638672E-5s bool(false)
Output for 5.5.30
mb_check_encoding: 6.9141387939453E-6s bool(false) preg_match: -1.1920928955078E-5s bool(false)
Output for 5.5.29
mb_check_encoding: 5.0067901611328E-6s bool(false) preg_match: -9.0599060058594E-6s bool(false)
Output for 5.5.11, 5.5.27
mb_check_encoding: 5.9604644775391E-6s bool(false) preg_match: -7.8678131103516E-6s bool(false)
Output for 5.5.24
mb_check_encoding: 1.0013580322266E-5s bool(false) preg_match: -1.215934753418E-5s bool(false)
Output for 5.5.23
mb_check_encoding: 1.0967254638672E-5s bool(false) preg_match: -1.5974044799805E-5s bool(false)
Output for 5.5.21
mb_check_encoding: 1.0967254638672E-5s bool(false) preg_match: -1.6927719116211E-5s bool(false)
Output for 5.5.19
mb_check_encoding: 7.1525573730469E-6s bool(false) preg_match: -9.0599060058594E-6s bool(false)
Output for 5.5.5, 5.5.14
mb_check_encoding: 5.9604644775391E-6s bool(false) preg_match: -9.0599060058594E-6s bool(false)
Output for 5.5.12
mb_check_encoding: 9.0599060058594E-6s bool(false) preg_match: -1.5020370483398E-5s bool(false)
Output for 5.5.9
mb_check_encoding: 9.0599060058594E-6s bool(false) preg_match: -1.2874603271484E-5s bool(false)
Output for 5.5.3
mb_check_encoding: 4.7683715820312E-6s bool(false) preg_match: -1.1205673217773E-5s bool(false)
Output for 5.5.1
mb_check_encoding: 7.8678131103516E-6s bool(false) preg_match: -1.1205673217773E-5s bool(false)
Output for 5.4.10, 5.4.45
mb_check_encoding: 1.0967254638672E-5s bool(false) preg_match: -2.4080276489258E-5s bool(false)
Output for 5.4.28, 5.4.44
mb_check_encoding: 6.9141387939453E-6s bool(false) preg_match: -1.5974044799805E-5s bool(false)
Output for 5.4.32, 5.4.36 - 5.4.37, 5.4.43
mb_check_encoding: 8.1062316894531E-6s bool(false) preg_match: -1.5974044799805E-5s bool(false)
Output for 5.4.42
mb_check_encoding: 6.9141387939453E-6s bool(false) preg_match: -1.4066696166992E-5s bool(false)
Output for 5.4.41
mb_check_encoding: 7.1525573730469E-6s bool(false) preg_match: -1.5974044799805E-5s bool(false)
Output for 5.4.40
mb_check_encoding: 1.1205673217773E-5s bool(false) preg_match: -2.4795532226562E-5s bool(false)
Output for 5.4.39
mb_check_encoding: 1.215934753418E-5s bool(false) preg_match: -2.598762512207E-5s bool(false)
Output for 5.4.35
mb_check_encoding: 6.9141387939453E-6s bool(false) preg_match: -1.6927719116211E-5s bool(false)
Output for 5.4.34
mb_check_encoding: 8.1062316894531E-6s bool(false) preg_match: -1.8835067749023E-5s bool(false)
Output for 5.4.31
mb_check_encoding: 5.0067901611328E-6s bool(false) preg_match: -1.215934753418E-5s bool(false)
Output for 5.4.30
mb_check_encoding: 8.1062316894531E-6s bool(false) preg_match: -2.0980834960938E-5s bool(false)
Output for 5.4.29
mb_check_encoding: 8.1062316894531E-6s bool(false) preg_match: -2.0027160644531E-5s bool(false)
Output for 5.4.9, 5.4.27
mb_check_encoding: 8.1062316894531E-6s bool(false) preg_match: -1.5020370483398E-5s bool(false)
Output for 5.4.26
mb_check_encoding: 5.9604644775391E-6s bool(false) preg_match: -1.0967254638672E-5s bool(false)
Output for 5.4.25
mb_check_encoding: 8.1062316894531E-6s bool(false) preg_match: -2.1934509277344E-5s bool(false)
Output for 5.4.24
mb_check_encoding: 5.9604644775391E-6s bool(false) preg_match: -1.5020370483398E-5s bool(false)
Output for 5.4.23
mb_check_encoding: 6.9141387939453E-6s bool(false) preg_match: -1.5020370483398E-5s bool(false)
Output for 5.4.22
mb_check_encoding: 1.0967254638672E-5s bool(false) preg_match: -2.288818359375E-5s bool(false)
Output for 5.4.21
mb_check_encoding: 5.0067901611328E-6s bool(false) preg_match: -1.1920928955078E-5s bool(false)
Output for 5.4.20
mb_check_encoding: 5.9604644775391E-6s bool(false) preg_match: -1.215934753418E-5s bool(false)
Output for 5.4.0, 5.4.18
mb_check_encoding: 8.1062316894531E-6s bool(false) preg_match: -1.7881393432617E-5s bool(false)
Output for 5.4.17
mb_check_encoding: 9.0599060058594E-6s bool(false) preg_match: -1.9073486328125E-5s bool(false)
Output for 5.4.16
mb_check_encoding: 1.0967254638672E-5s bool(false) preg_match: -2.7894973754883E-5s bool(false)
Output for 5.4.15
mb_check_encoding: 1.4066696166992E-5s bool(false) preg_match: -2.0027160644531E-5s bool(false)
Output for 5.4.3, 5.4.13 - 5.4.14
mb_check_encoding: 8.1062316894531E-6s bool(false) preg_match: -1.6927719116211E-5s bool(false)
Output for 5.4.12
mb_check_encoding: 9.0599060058594E-6s bool(false) preg_match: -1.7881393432617E-5s bool(false)
Output for 5.4.6, 5.4.11
mb_check_encoding: 9.0599060058594E-6s bool(false) preg_match: -1.6927719116211E-5s bool(false)
Output for 5.4.8
mb_check_encoding: 5.9604644775391E-6s bool(false) preg_match: -1.2874603271484E-5s bool(false)
Output for 5.4.7
mb_check_encoding: 7.8678131103516E-6s bool(false) preg_match: -2.0027160644531E-5s bool(false)
Output for 5.4.5
mb_check_encoding: 5.9604644775391E-6s bool(false) preg_match: -1.1920928955078E-5s bool(false)
Output for 5.4.4
mb_check_encoding: 1.0967254638672E-5s bool(false) preg_match: -2.1934509277344E-5s bool(false)
Output for 5.4.1
mb_check_encoding: 7.8678131103516E-6s bool(false) preg_match: -1.7166137695312E-5s bool(false)
Output for 5.3.29
mb_check_encoding: 5.0067901611328E-6s bool(true) preg_match: -1.0967254638672E-5s bool(false)
Output for 5.3.28
mb_check_encoding: 7.8678131103516E-6s bool(true) preg_match: -1.3113021850586E-5s bool(false)
Output for 5.3.5, 5.3.12, 5.3.18, 5.3.24 - 5.3.25, 5.3.27
mb_check_encoding: 8.1062316894531E-6s bool(true) preg_match: -1.2874603271484E-5s bool(false)
Output for 5.3.22, 5.3.26
mb_check_encoding: 6.9141387939453E-6s bool(true) preg_match: -1.1920928955078E-5s bool(false)
Output for 5.3.23
mb_check_encoding: 5.9604644775391E-6s bool(true) preg_match: -1.1205673217773E-5s bool(false)
Output for 5.3.21
mb_check_encoding: 5.0067901611328E-6s bool(true) preg_match: -1.0013580322266E-5s bool(false)
Output for 5.3.20
mb_check_encoding: 8.1062316894531E-6s bool(true) preg_match: -1.1920928955078E-5s bool(false)
Output for 5.3.19
mb_check_encoding: 6.1988830566406E-6s bool(true) preg_match: -8.8214874267578E-6s bool(false)
Output for 5.3.17
mb_check_encoding: 5.0067901611328E-6s bool(true) preg_match: -9.0599060058594E-6s bool(false)
Output for 5.3.8, 5.3.16
mb_check_encoding: 6.1988830566406E-6s bool(true) preg_match: -1.0967254638672E-5s bool(false)
Output for 5.3.14 - 5.3.15
mb_check_encoding: 5.9604644775391E-6s bool(true) preg_match: -1.0013580322266E-5s bool(false)
Output for 5.3.13
mb_check_encoding: 9.0599060058594E-6s bool(true) preg_match: -1.5974044799805E-5s bool(false)
Output for 5.3.11
mb_check_encoding: 5.9604644775391E-6s bool(true) preg_match: -1.0967254638672E-5s bool(false)
Output for 5.3.10
mb_check_encoding: 7.8678131103516E-6s bool(true) preg_match: -1.4066696166992E-5s bool(false)
Output for 5.3.9
mb_check_encoding: 9.0599060058594E-6s bool(true) preg_match: -1.4066696166992E-5s bool(false)
Output for 5.3.7
mb_check_encoding: 8.1062316894531E-6s bool(true) preg_match: -1.3828277587891E-5s bool(false)
Output for 5.3.6
mb_check_encoding: 6.9141387939453E-6s bool(true) preg_match: -1.3113021850586E-5s bool(false)
Output for 5.3.4
mb_check_encoding: 8.1062316894531E-6s bool(true) preg_match: -1.5974044799805E-5s bool(false)
Output for 5.2.15, 5.3.3
mb_check_encoding: 6.9141387939453E-6s bool(true) preg_match: -1.215934753418E-5s int(0)
Output for 5.3.2
mb_check_encoding: 8.1062316894531E-6s bool(true) preg_match: -1.2874603271484E-5s int(0)
Output for 5.3.1
mb_check_encoding: 1.215934753418E-5s bool(true) preg_match: -1.8835067749023E-5s int(0)
Output for 5.2.9, 5.3.0
mb_check_encoding: 8.1062316894531E-6s bool(true) preg_match: -1.4066696166992E-5s int(0)
Output for 5.2.17
mb_check_encoding: 7.8678131103516E-6s bool(true) preg_match: -1.4066696166992E-5s int(0)
Output for 5.2.16
mb_check_encoding: 5.9604644775391E-6s bool(true) preg_match: -1.0013580322266E-5s int(0)
Output for 5.2.12, 5.2.14
mb_check_encoding: 1.1920928955078E-5s bool(true) preg_match: -1.9073486328125E-5s int(0)
Output for 5.2.13
mb_check_encoding: 9.0599060058594E-6s bool(true) preg_match: -1.5974044799805E-5s int(0)
Output for 5.2.11
mb_check_encoding: 9.0599060058594E-6s bool(true) preg_match: -1.4066696166992E-5s int(0)
Output for 5.2.10
mb_check_encoding: 8.1062316894531E-6s bool(true) preg_match: -1.3113021850586E-5s int(0)
Output for 5.2.8
mb_check_encoding: 1.0967254638672E-5s bool(true) preg_match: -1.9073486328125E-5s int(0)
Output for 5.2.7
mb_check_encoding: 1.0013580322266E-5s bool(true) preg_match: -1.7881393432617E-5s int(0)
Output for 5.2.6
mb_check_encoding: 1.0967254638672E-5s bool(true) preg_match: -1.4066696166992E-5s int(0)
Output for 5.2.5
mb_check_encoding: 1.0013580322266E-5s bool(true) preg_match: -1.3113021850586E-5s int(0)
Output for 5.2.4
mb_check_encoding: 9.0599060058594E-6s bool(true) preg_match: -1.215934753418E-5s int(1)
Output for 5.2.3
mb_check_encoding: 1.3828277587891E-5s bool(true) preg_match: -1.9073486328125E-5s int(1)
Output for 5.2.2
mb_check_encoding: 1.0967254638672E-5s bool(true) preg_match: -1.3113021850586E-5s int(1)
Output for 5.2.1
mb_check_encoding: 1.0013580322266E-05s bool(true) preg_match: -1.0967254638672E-05s int(1)
Output for 5.2.0
mb_check_encoding: 7.8678131103516E-06s bool(true) preg_match: -1.1205673217773E-05s int(1)
Output for 5.1.6
mb_check_encoding: 1.4066696166992E-05s bool(true) preg_match: -1.5020370483398E-05s int(1)
Output for 5.1.5
mb_check_encoding: 1.4066696166992E-05s bool(true) preg_match: -1.4781951904297E-05s int(1)
Output for 5.1.4
mb_check_encoding: 1.3828277587891E-05s bool(true) preg_match: -1.4066696166992E-05s int(1)
Output for 5.1.3
mb_check_encoding: 1.0967254638672E-05s bool(true) preg_match: -1.0967254638672E-05s int(1)
Output for 5.0.0 - 5.1.2
mb_check_encoding: Fatal error: Call to undefined function mb_check_encoding() in /in/DDO1c on line 7
Process exited with code 255.
Output for 4.4.9
mb_check_encoding: 1.9E-05s bool(true) preg_match: -2E-05s int(0)
Output for 4.4.8
mb_check_encoding: 2.1E-05s bool(true) preg_match: -3.2E-05s int(1)
Output for 4.4.7
mb_check_encoding: 2.1E-05s bool(true) preg_match: -1.5E-05s int(1)
Output for 4.4.6
mb_check_encoding: 2.3E-05s bool(true) preg_match: -2.8E-05s int(1)
Output for 4.4.5
mb_check_encoding: 3E-05s bool(true) preg_match: -2.6E-05s int(1)
Output for 4.4.4
mb_check_encoding: 1.6E-05s bool(true) preg_match: -2E-05s int(1)
Output for 4.4.3
mb_check_encoding: 1.4E-05s bool(true) preg_match: -2.1E-05s int(1)
Output for 4.3.2 - 4.4.2
mb_check_encoding: Fatal error: Call to undefined function: mb_check_encoding() in /in/DDO1c on line 7
Process exited with code 255.
Output for 4.3.0 - 4.3.1
mb_check_encoding: Fatal error: Call to undefined function: mb_check_encoding() in /in/DDO1c on line 7