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" ); $et = microtime( true ); echo $et - $st, 's '; var_dump( $ans ); } dostuff();
Output for 7.1.0
mb_check_encoding: 8.8214874267578E-6s bool(false) preg_match: 5.9843063354492E-5s bool(false)
Output for 7.0.14
mb_check_encoding: 8.1062316894531E-6s bool(false) preg_match: 5.7220458984375E-5s bool(false)
Output for 7.0.6
mb_check_encoding: 6.1988830566406E-6s bool(false) preg_match: 4.3153762817383E-5s bool(false)
Output for 7.0.5
mb_check_encoding: 6.9141387939453E-6s bool(false) preg_match: 4.3869018554688E-5s bool(false)
Output for 7.0.4
mb_check_encoding: 5.9604644775391E-6s bool(false) preg_match: 4.5061111450195E-5s bool(false)
Output for 7.0.3
mb_check_encoding: 7.1525573730469E-6s bool(false) preg_match: 4.5061111450195E-5s bool(false)
Output for 7.0.2
mb_check_encoding: 7.8678131103516E-6s bool(false) preg_match: 5.0067901611328E-5s bool(false)
Output for 7.0.1
mb_check_encoding: 5.9604644775391E-6s bool(false) preg_match: 4.7922134399414E-5s bool(false)
Output for 7.0.0
mb_check_encoding: 5.0067901611328E-6s bool(false) preg_match: 3.6954879760742E-5s bool(false)
Output for 5.6.28
mb_check_encoding: 8.1062316894531E-6s bool(false) preg_match: 1.0967254638672E-5s bool(false)
Output for 5.6.21
mb_check_encoding: 7.1525573730469E-6s bool(false) preg_match: 1.0967254638672E-5s bool(false)
Output for 5.5.20, 5.5.27 - 5.5.28, 5.6.7, 5.6.10, 5.6.14, 5.6.16, 5.6.20
mb_check_encoding: 6.9141387939453E-6s bool(false) preg_match: 1.0013580322266E-5s bool(false)
Output for 5.6.17, 5.6.19
mb_check_encoding: 7.1525573730469E-6s bool(false) preg_match: 1.0013580322266E-5s bool(false)
Output for 5.5.30, 5.6.18
mb_check_encoding: 1.0013580322266E-5s bool(false) preg_match: 1.4066696166992E-5s bool(false)
Output for 5.5.13, 5.5.24, 5.5.33, 5.6.15
mb_check_encoding: 8.1062316894531E-6s bool(false) preg_match: 1.0013580322266E-5s bool(false)
Output for 5.5.12, 5.6.13
mb_check_encoding: 7.1525573730469E-6s bool(false) preg_match: 8.8214874267578E-6s bool(false)
Output for 5.6.12
mb_check_encoding: 5.9604644775391E-6s bool(false) preg_match: 1.0013580322266E-5s bool(false)
Output for 5.4.44, 5.5.16, 5.5.25, 5.6.11
mb_check_encoding: 7.1525573730469E-6s bool(false) preg_match: 9.0599060058594E-6s bool(false)
Output for 5.6.9
mb_check_encoding: 8.1062316894531E-6s bool(false) preg_match: 9.0599060058594E-6s bool(false)
Output for 5.4.36, 5.4.38, 5.4.41, 5.6.8
mb_check_encoding: 6.9141387939453E-6s bool(false) preg_match: 9.0599060058594E-6s bool(false)
Output for 5.4.27, 5.5.11, 5.6.6
mb_check_encoding: 6.9141387939453E-6s bool(false) preg_match: 8.8214874267578E-6s bool(false)
Output for 5.4.45, 5.5.10, 5.5.23, 5.5.26, 5.6.5
mb_check_encoding: 7.8678131103516E-6s bool(false) preg_match: 1.0013580322266E-5s bool(false)
Output for 5.6.4
mb_check_encoding: 7.8678131103516E-6s bool(false) preg_match: 8.8214874267578E-6s bool(false)
Output for 5.6.3
mb_check_encoding: 9.0599060058594E-6s bool(false) preg_match: 8.8214874267578E-6s bool(false)
Output for 5.6.2
mb_check_encoding: 6.9141387939453E-6s bool(false) preg_match: 8.1062316894531E-6s bool(false)
Output for 5.6.1
mb_check_encoding: 9.0599060058594E-6s bool(false) preg_match: 1.4066696166992E-5s bool(false)
Output for 5.5.18, 5.6.0
mb_check_encoding: 7.8678131103516E-6s bool(false) preg_match: 9.7751617431641E-6s bool(false)
Output for 5.4.2, 5.5.35
mb_check_encoding: 5.9604644775391E-6s bool(false) preg_match: 8.1062316894531E-6s bool(false)
Output for 5.5.32, 5.5.34
mb_check_encoding: 7.8678131103516E-6s bool(false) preg_match: 1.0967254638672E-5s bool(false)
Output for 5.5.31
mb_check_encoding: 6.9141387939453E-6s bool(false) preg_match: 9.7751617431641E-6s bool(false)
Output for 5.5.29
mb_check_encoding: 7.8678131103516E-6s bool(false) preg_match: 1.215934753418E-5s bool(false)
Output for 5.5.0, 5.5.22
mb_check_encoding: 5.0067901611328E-6s bool(false) preg_match: 7.8678131103516E-6s bool(false)
Output for 5.4.12, 5.4.17, 5.4.28, 5.4.32, 5.4.39, 5.5.1, 5.5.21
mb_check_encoding: 5.9604644775391E-6s bool(false) preg_match: 6.9141387939453E-6s bool(false)
Output for 5.5.19
mb_check_encoding: 3.7193298339844E-5s bool(false) preg_match: 1.0967254638672E-5s bool(false)
Output for 5.5.15
mb_check_encoding: 5.9604644775391E-6s bool(false) preg_match: 8.8214874267578E-6s bool(false)
Output for 5.5.14
mb_check_encoding: 6.1988830566406E-6s bool(false) preg_match: 8.1062316894531E-6s bool(false)
Output for 5.4.6, 5.4.14, 5.4.16, 5.5.6, 5.5.9
mb_check_encoding: 5.9604644775391E-6s bool(false) preg_match: 7.1525573730469E-6s bool(false)
Output for 5.5.8
mb_check_encoding: 6.1988830566406E-6s bool(false) preg_match: 6.9141387939453E-6s bool(false)
Output for 5.5.7
mb_check_encoding: 5.0067901611328E-6s bool(false) preg_match: 6.9141387939453E-6s bool(false)
Output for 5.4.5, 5.4.7, 5.4.19, 5.5.5
mb_check_encoding: 5.0067901611328E-6s bool(false) preg_match: 5.9604644775391E-6s bool(false)
Output for 5.5.4
mb_check_encoding: 6.9141387939453E-6s bool(false) preg_match: 5.0067901611328E-6s bool(false)
Output for 5.4.1, 5.5.2 - 5.5.3
mb_check_encoding: 4.0531158447266E-6s bool(false) preg_match: 5.9604644775391E-6s bool(false)
Output for 5.4.43
mb_check_encoding: 8.8214874267578E-6s bool(false) preg_match: 9.0599060058594E-6s bool(false)
Output for 5.4.42
mb_check_encoding: 7.8678131103516E-6s bool(false) preg_match: 1.2874603271484E-5s bool(false)
Output for 5.4.40
mb_check_encoding: 5.9604644775391E-6s bool(false) preg_match: 7.8678131103516E-6s bool(false)
Output for 5.4.22, 5.4.37
mb_check_encoding: 8.1062316894531E-6s bool(false) preg_match: 8.8214874267578E-6s bool(false)
Output for 5.4.35
mb_check_encoding: 5.9604644775391E-6s bool(false) preg_match: 9.0599060058594E-6s bool(false)
Output for 5.4.34
mb_check_encoding: 7.1525573730469E-6s bool(false) preg_match: 8.1062316894531E-6s bool(false)
Output for 5.4.31
mb_check_encoding: 1.1920928955078E-5s bool(false) preg_match: 8.1062316894531E-6s bool(false)
Output for 5.4.30
mb_check_encoding: 9.0599060058594E-6s bool(false) preg_match: 9.0599060058594E-6s bool(false)
Output for 5.4.29
mb_check_encoding: 7.1525573730469E-6s bool(false) preg_match: 1.1920928955078E-5s bool(false)
Output for 5.4.26
mb_check_encoding: 6.1988830566406E-6s bool(false) preg_match: 9.0599060058594E-6s bool(false)
Output for 5.4.25
mb_check_encoding: 9.0599060058594E-6s bool(false) preg_match: 7.8678131103516E-6s bool(false)
Output for 5.4.24
mb_check_encoding: 7.8678131103516E-6s bool(false) preg_match: 8.1062316894531E-6s bool(false)
Output for 5.4.23
mb_check_encoding: 5.0067901611328E-6s bool(false) preg_match: 7.1525573730469E-6s bool(false)
Output for 5.4.21
mb_check_encoding: 6.1988830566406E-6s bool(false) preg_match: 5.0067901611328E-6s bool(false)
Output for 5.4.20
mb_check_encoding: 5.9604644775391E-6s bool(false) preg_match: 5.9604644775391E-6s bool(false)
Output for 5.4.18
mb_check_encoding: 3.814697265625E-6s bool(false) preg_match: 5.9604644775391E-6s bool(false)
Output for 5.4.15
mb_check_encoding: 6.9141387939453E-6s bool(false) preg_match: 6.9141387939453E-6s bool(false)
Output for 5.4.3 - 5.4.4, 5.4.10, 5.4.13
mb_check_encoding: 5.0067901611328E-6s bool(false) preg_match: 5.0067901611328E-6s bool(false)
Output for 5.4.11
mb_check_encoding: 5.9604644775391E-6s bool(false) preg_match: 5.0067901611328E-6s bool(false)
Output for 5.4.9
mb_check_encoding: 4.0531158447266E-6s bool(false) preg_match: 5.0067901611328E-6s bool(false)
Output for 5.4.8
mb_check_encoding: 6.9141387939453E-6s bool(false) preg_match: 5.9604644775391E-6s bool(false)
Output for 5.4.0
mb_check_encoding: 4.0531158447266E-6s bool(false) preg_match: 4.0531158447266E-6s bool(false)
Output for 5.3.29
mb_check_encoding: 1.0013580322266E-5s bool(true) preg_match: 1.215934753418E-5s bool(false)
Output for 5.3.28
mb_check_encoding: 5.0067901611328E-6s bool(true) preg_match: 6.1988830566406E-6s bool(false)
Output for 5.3.12, 5.3.27
mb_check_encoding: 5.9604644775391E-6s bool(true) preg_match: 6.9141387939453E-6s bool(false)
Output for 5.3.26
mb_check_encoding: 4.0531158447266E-6s bool(true) preg_match: 5.9604644775391E-6s bool(false)
Output for 5.3.25
mb_check_encoding: 3.814697265625E-6s bool(true) preg_match: 5.9604644775391E-6s bool(false)
Output for 5.3.14 - 5.3.15, 5.3.20, 5.3.24
mb_check_encoding: 4.0531158447266E-6s bool(true) preg_match: 5.0067901611328E-6s bool(false)
Output for 5.3.19, 5.3.21 - 5.3.23
mb_check_encoding: 5.0067901611328E-6s bool(true) preg_match: 5.0067901611328E-6s bool(false)
Output for 5.3.18
mb_check_encoding: 4.0531158447266E-6s bool(true) preg_match: 6.9141387939453E-6s bool(false)
Output for 5.3.17
mb_check_encoding: 3.814697265625E-6s bool(true) preg_match: 5.0067901611328E-6s bool(false)
Output for 5.3.16
mb_check_encoding: 5.0067901611328E-6s bool(true) preg_match: 5.9604644775391E-6s bool(false)
Output for 5.3.13
mb_check_encoding: 5.0067901611328E-6s bool(true) preg_match: 7.1525573730469E-6s bool(false)
Output for 5.3.11
mb_check_encoding: 5.9604644775391E-6s bool(true) preg_match: 8.1062316894531E-6s bool(false)
Output for 5.3.5, 5.3.10
mb_check_encoding: 7.8678131103516E-6s bool(true) preg_match: 9.0599060058594E-6s bool(false)
Output for 5.3.9
mb_check_encoding: 7.1525573730469E-6s bool(true) preg_match: 9.0599060058594E-6s bool(false)
Output for 5.3.8
mb_check_encoding: 9.0599060058594E-6s bool(true) preg_match: 1.215934753418E-5s bool(false)
Output for 5.3.7
mb_check_encoding: 6.9141387939453E-6s bool(true) preg_match: 7.8678131103516E-6s bool(false)
Output for 5.3.6
mb_check_encoding: 6.9141387939453E-6s bool(true) preg_match: 8.1062316894531E-6s bool(false)
Output for 5.3.4
mb_check_encoding: 7.1525573730469E-6s bool(true) preg_match: 1.0967254638672E-5s bool(false)
Output for 5.3.3
mb_check_encoding: 6.9141387939453E-6s bool(true) preg_match: 7.8678131103516E-6s int(0)
Output for 5.3.2
mb_check_encoding: 5.9604644775391E-6s bool(true) preg_match: 7.8678131103516E-6s int(0)
Output for 5.3.1
mb_check_encoding: 8.1062316894531E-6s bool(true) preg_match: 8.1062316894531E-6s int(0)
Output for 5.3.0
mb_check_encoding: 8.1062316894531E-6s bool(true) preg_match: 9.0599060058594E-6s int(0)
Output for 5.2.17
mb_check_encoding: 8.1062316894531E-6s bool(true) preg_match: 7.8678131103516E-6s int(0)
Output for 5.2.16
mb_check_encoding: 9.0599060058594E-6s bool(true) preg_match: 9.0599060058594E-6s int(0)
Output for 5.2.11, 5.2.15
mb_check_encoding: 8.1062316894531E-6s bool(true) preg_match: 6.9141387939453E-6s int(0)
Output for 5.2.14
mb_check_encoding: 8.1062316894531E-6s bool(true) preg_match: 1.0013580322266E-5s int(0)
Output for 5.2.13
mb_check_encoding: 7.8678131103516E-6s bool(true) preg_match: 8.1062316894531E-6s int(0)
Output for 5.2.12
mb_check_encoding: 8.1062316894531E-6s bool(true) preg_match: 7.1525573730469E-6s int(0)
Output for 5.2.10
mb_check_encoding: 1.0967254638672E-5s bool(true) preg_match: 1.2874603271484E-5s int(0)
Output for 5.2.9
mb_check_encoding: 1.0013580322266E-5s bool(true) preg_match: 1.0013580322266E-5s int(0)
Output for 5.2.8
mb_check_encoding: 7.8678131103516E-6s bool(true) preg_match: 9.0599060058594E-6s int(0)
Output for 5.2.7
mb_check_encoding: 1.0013580322266E-5s bool(true) preg_match: 1.5020370483398E-5s int(0)
Output for 5.2.6
mb_check_encoding: 1.0013580322266E-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: 7.8678131103516E-6s int(0)
Output for 5.2.4
mb_check_encoding: 8.8214874267578E-6s bool(true) preg_match: 1.1205673217773E-5s int(1)
Output for 5.2.3
mb_check_encoding: 1.0013580322266E-5s bool(true) preg_match: 1.4066696166992E-5s int(1)
Output for 5.2.2
mb_check_encoding: 8.8214874267578E-6s bool(true) preg_match: 1.1920928955078E-5s int(1)
Output for 5.2.1
mb_check_encoding: 1.1920928955078E-05s bool(true) preg_match: 1.5020370483398E-05s int(1)
Output for 5.2.0
mb_check_encoding: 6.9141387939453E-06s bool(true) preg_match: 9.0599060058594E-06s int(1)
Output for 5.1.6
mb_check_encoding: 1.0967254638672E-05s bool(true) preg_match: 8.8214874267578E-06s int(1)
Output for 5.1.5
mb_check_encoding: 1.0013580322266E-05s bool(true) preg_match: 8.1062316894531E-06s int(1)
Output for 5.1.4
mb_check_encoding: 1.1920928955078E-05s bool(true) preg_match: 8.1062316894531E-06s int(1)
Output for 5.1.3
mb_check_encoding: 1.1205673217773E-05s bool(true) preg_match: 7.8678131103516E-06s int(1)
Output for 5.0.0 - 5.1.2
mb_check_encoding: Fatal error: Call to undefined function mb_check_encoding() in /in/GInQM on line 7
Process exited with code 255.
Output for 4.4.9
mb_check_encoding: 2.4999999999942E-05s bool(true) preg_match: 8.9999999999257E-06s int(0)
Output for 4.4.8
mb_check_encoding: 2.1999999999966E-05s bool(true) preg_match: 1.3000000000041E-05s int(1)
Output for 4.4.7
mb_check_encoding: 3.3999999999978E-05s bool(true) preg_match: 1.8000000000074E-05s int(1)
Output for 4.4.6
mb_check_encoding: 1.7000000000045E-05s bool(true) preg_match: 9.9999999999545E-06s int(1)
Output for 4.4.5
mb_check_encoding: 2.000000000002E-05s bool(true) preg_match: 8.000000000008E-06s int(1)
Output for 4.4.4
mb_check_encoding: 2.6999999999999E-05s bool(true) preg_match: 1.0999999999983E-05s int(1)
Output for 4.4.3
mb_check_encoding: 1.6999999999934E-05s bool(true) preg_match: 6.0000000000615E-06s int(1)
Output for 4.3.2 - 4.4.2
mb_check_encoding: Fatal error: Call to undefined function: mb_check_encoding() in /in/GInQM 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/GInQM on line 7