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( "成都瑞雪精密机械有限公司", '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();
based on GInQM
Output for 7.1.0
mb_check_encoding: 7.8678131103516E-6s bool(true) preg_match: 4.5061111450195E-5s bool(false)
Output for 7.0.14
mb_check_encoding: 7.8678131103516E-6s bool(true) preg_match: 4.7922134399414E-5s bool(false)
Output for 7.0.6
mb_check_encoding: 6.9141387939453E-6s bool(true) preg_match: 5.1021575927734E-5s bool(false)
Output for 7.0.5
mb_check_encoding: 1.0967254638672E-5s bool(true) preg_match: 5.6028366088867E-5s bool(false)
Output for 7.0.4
mb_check_encoding: 7.8678131103516E-6s bool(true) preg_match: 5.1021575927734E-5s bool(false)
Output for 7.0.3
mb_check_encoding: 5.9604644775391E-6s bool(true) preg_match: 4.1961669921875E-5s bool(false)
Output for 7.0.2
mb_check_encoding: 5.9604644775391E-6s bool(true) preg_match: 3.8862228393555E-5s bool(false)
Output for 7.0.1
mb_check_encoding: 1.0967254638672E-5s bool(true) preg_match: 7.5101852416992E-5s bool(false)
Output for 7.0.0
mb_check_encoding: 8.8214874267578E-6s bool(true) preg_match: 5.2928924560547E-5s bool(false)
Output for hhvm-3.12.0
mb_check_encoding: 3.1948089599609E-5s bool(true) preg_match: 7.7009201049805E-5s bool(false)
Output for hhvm-3.10.0
mb_check_encoding: 2.1934509277344E-5s bool(true) preg_match: 6.6041946411133E-5s bool(false)
Output for 5.6.28
mb_check_encoding: 8.1062316894531E-6s bool(true) preg_match: 1.0967254638672E-5s bool(false)
Output for 5.3.16, 5.4.26, 5.4.29, 5.6.21
mb_check_encoding: 8.1062316894531E-6s bool(true) preg_match: 1.0013580322266E-5s bool(false)
Output for 5.6.20
mb_check_encoding: 1.0013580322266E-5s bool(true) preg_match: 1.4066696166992E-5s bool(false)
Output for 5.6.19
mb_check_encoding: 8.1062316894531E-6s bool(true) preg_match: 8.1062316894531E-6s bool(false)
Output for 5.4.20, 5.4.30, 5.5.27, 5.5.35, 5.6.18
mb_check_encoding: 8.1062316894531E-6s bool(true) preg_match: 9.0599060058594E-6s bool(false)
Output for 5.6.17
mb_check_encoding: 5.0067901611328E-6s bool(true) preg_match: 8.1062316894531E-6s bool(false)
Output for 5.6.16
mb_check_encoding: 7.8678131103516E-6s bool(true) preg_match: 1.215934753418E-5s bool(false)
Output for 5.6.15
mb_check_encoding: 8.1062316894531E-6s bool(true) preg_match: 1.1920928955078E-5s bool(false)
Output for 5.5.30, 5.6.14
mb_check_encoding: 9.0599060058594E-6s bool(true) preg_match: 1.0967254638672E-5s bool(false)
Output for 5.6.13
mb_check_encoding: 9.0599060058594E-6s bool(true) preg_match: 1.1920928955078E-5s bool(false)
Output for 5.6.12
mb_check_encoding: 5.9604644775391E-6s bool(true) preg_match: 9.0599060058594E-6s bool(false)
Output for 5.6.11
mb_check_encoding: 9.0599060058594E-6s bool(true) preg_match: 1.1205673217773E-5s bool(false)
Output for 5.6.10
mb_check_encoding: 6.9141387939453E-6s bool(true) preg_match: 1.0967254638672E-5s bool(false)
Output for 5.6.9
mb_check_encoding: 6.1988830566406E-6s bool(true) preg_match: 8.1062316894531E-6s bool(false)
Output for 5.6.8
mb_check_encoding: 1.0967254638672E-5s bool(true) preg_match: 1.2874603271484E-5s bool(false)
Output for 5.5.34
mb_check_encoding: 7.8678131103516E-6s bool(true) preg_match: 1.0967254638672E-5s bool(false)
Output for 5.5.33
mb_check_encoding: 7.1525573730469E-6s bool(true) preg_match: 1.0013580322266E-5s bool(false)
Output for 5.5.32
mb_check_encoding: 2.1934509277344E-5s bool(true) preg_match: 7.8678131103516E-6s bool(false)
Output for 5.5.31
mb_check_encoding: 5.9604644775391E-6s bool(true) preg_match: 7.8678131103516E-6s bool(false)
Output for 5.5.29
mb_check_encoding: 9.0599060058594E-6s bool(true) preg_match: 1.3828277587891E-5s bool(false)
Output for 5.3.6, 5.5.28
mb_check_encoding: 8.1062316894531E-6s bool(true) preg_match: 8.8214874267578E-6s bool(false)
Output for 5.5.26
mb_check_encoding: 8.8214874267578E-6s bool(true) preg_match: 1.0013580322266E-5s bool(false)
Output for 5.5.25
mb_check_encoding: 6.9141387939453E-6s bool(true) preg_match: 1.1920928955078E-5s bool(false)
Output for 5.5.24
mb_check_encoding: 7.8678131103516E-6s bool(true) preg_match: 9.0599060058594E-6s bool(false)
Output for 5.4.44 - 5.4.45
mb_check_encoding: 1.0013580322266E-5s bool(true) preg_match: 1.0967254638672E-5s bool(false)
Output for 5.4.43
mb_check_encoding: 1.3113021850586E-5s bool(true) preg_match: 1.9073486328125E-5s bool(false)
Output for 5.4.42
mb_check_encoding: 1.3828277587891E-5s bool(true) preg_match: 1.7166137695312E-5s bool(false)
Output for 5.4.41
mb_check_encoding: 1.2874603271484E-5s bool(true) preg_match: 1.9073486328125E-5s bool(false)
Output for 5.4.40
mb_check_encoding: 1.5020370483398E-5s bool(true) preg_match: 2.2172927856445E-5s bool(false)
Output for 5.4.39
mb_check_encoding: 1.3113021850586E-5s bool(true) preg_match: 2.0980834960938E-5s bool(false)
Output for 5.4.38
mb_check_encoding: 4.6968460083008E-5s bool(true) preg_match: 1.7881393432617E-5s bool(false)
Output for 5.4.37
mb_check_encoding: 1.4066696166992E-5s bool(true) preg_match: 1.5974044799805E-5s bool(false)
Output for 5.4.36
mb_check_encoding: 1.5974044799805E-5s bool(true) preg_match: 1.5974044799805E-5s bool(false)
Output for 5.4.35
mb_check_encoding: 1.978874206543E-5s bool(true) preg_match: 1.6927719116211E-5s bool(false)
Output for 5.4.34
mb_check_encoding: 1.2874603271484E-5s bool(true) preg_match: 1.3828277587891E-5s bool(false)
Output for 5.4.5, 5.4.32
mb_check_encoding: 1.1920928955078E-5s bool(true) preg_match: 1.3113021850586E-5s bool(false)
Output for 5.4.31
mb_check_encoding: 7.8678131103516E-6s bool(true) preg_match: 1.0013580322266E-5s bool(false)
Output for 5.3.14, 5.4.2, 5.4.18, 5.4.24 - 5.4.25, 5.4.28
mb_check_encoding: 9.0599060058594E-6s bool(true) preg_match: 1.0013580322266E-5s bool(false)
Output for 5.4.27
mb_check_encoding: 1.0967254638672E-5s bool(true) preg_match: 1.1205673217773E-5s bool(false)
Output for 5.3.21, 5.4.23
mb_check_encoding: 1.0013580322266E-5s bool(true) preg_match: 1.2874603271484E-5s bool(false)
Output for 5.4.22
mb_check_encoding: 9.0599060058594E-6s bool(true) preg_match: 2.3841857910156E-5s bool(false)
Output for 5.4.21
mb_check_encoding: 9.0599060058594E-6s bool(true) preg_match: 2.4080276489258E-5s bool(false)
Output for 5.4.19
mb_check_encoding: 8.1062316894531E-6s bool(true) preg_match: 2.4080276489258E-5s bool(false)
Output for 5.4.17
mb_check_encoding: 8.8214874267578E-6s bool(true) preg_match: 3.504753112793E-5s bool(false)
Output for 5.4.16
mb_check_encoding: 1.0967254638672E-5s bool(true) preg_match: 2.5033950805664E-5s bool(false)
Output for 5.4.15
mb_check_encoding: 8.8214874267578E-6s bool(true) preg_match: 1.9073486328125E-5s bool(false)
Output for 5.4.14
mb_check_encoding: 1.0013580322266E-5s bool(true) preg_match: 1.215934753418E-5s bool(false)
Output for 5.4.13
mb_check_encoding: 1.215934753418E-5s bool(true) preg_match: 1.215934753418E-5s bool(false)
Output for 5.4.12
mb_check_encoding: 8.8214874267578E-6s bool(true) preg_match: 8.1062316894531E-6s bool(false)
Output for 5.4.0, 5.4.11
mb_check_encoding: 1.1920928955078E-5s bool(true) preg_match: 1.0967254638672E-5s bool(false)
Output for 5.4.10
mb_check_encoding: 9.0599060058594E-6s bool(true) preg_match: 2.9802322387695E-5s bool(false)
Output for 5.3.9, 5.4.9
mb_check_encoding: 8.8214874267578E-6s bool(true) preg_match: 9.0599060058594E-6s bool(false)
Output for 5.3.10, 5.3.24, 5.4.1, 5.4.7 - 5.4.8
mb_check_encoding: 1.0967254638672E-5s bool(true) preg_match: 1.1920928955078E-5s bool(false)
Output for 5.4.6
mb_check_encoding: 1.1920928955078E-5s bool(true) preg_match: 1.1920928955078E-5s bool(false)
Output for 5.3.8, 5.4.4
mb_check_encoding: 1.0013580322266E-5s bool(true) preg_match: 1.0013580322266E-5s bool(false)
Output for 5.4.3
mb_check_encoding: 8.8214874267578E-6s bool(true) preg_match: 2.4795532226562E-5s bool(false)
Output for 5.3.29
mb_check_encoding: 1.0013580322266E-5s bool(true) preg_match: 1.1920928955078E-5s bool(false)
Output for 5.3.28
mb_check_encoding: 9.7751617431641E-6s bool(true) preg_match: 1.215934753418E-5s bool(false)
Output for 5.3.27
mb_check_encoding: 1.0013580322266E-5s bool(true) preg_match: 1.7881393432617E-5s bool(false)
Output for 5.3.26
mb_check_encoding: 1.0967254638672E-5s bool(true) preg_match: 1.215934753418E-5s bool(false)
Output for 5.3.25
mb_check_encoding: 1.0967254638672E-5s bool(true) preg_match: 1.4066696166992E-5s bool(false)
Output for 5.3.23
mb_check_encoding: 8.8214874267578E-6s bool(true) preg_match: 2.5033950805664E-5s bool(false)
Output for 5.3.22
mb_check_encoding: 7.8678131103516E-6s bool(true) preg_match: 2.598762512207E-5s bool(false)
Output for 5.3.20
mb_check_encoding: 1.0967254638672E-5s bool(true) preg_match: 1.0967254638672E-5s bool(false)
Output for 5.3.19
mb_check_encoding: 9.0599060058594E-6s bool(true) preg_match: 2.5033950805664E-5s bool(false)
Output for 5.3.18
mb_check_encoding: 9.0599060058594E-6s bool(true) preg_match: 9.0599060058594E-6s bool(false)
Output for 5.3.17
mb_check_encoding: 9.0599060058594E-6s bool(true) preg_match: 2.3126602172852E-5s bool(false)
Output for 5.3.15
mb_check_encoding: 1.2874603271484E-5s bool(true) preg_match: 1.0967254638672E-5s bool(false)
Output for 5.3.13
mb_check_encoding: 9.0599060058594E-6s bool(true) preg_match: 2.6941299438477E-5s bool(false)
Output for 5.3.12
mb_check_encoding: 7.8678131103516E-6s bool(true) preg_match: 1.1920928955078E-5s bool(false)
Output for 5.3.11
mb_check_encoding: 1.215934753418E-5s bool(true) preg_match: 9.0599060058594E-6s bool(false)
Output for 5.3.7
mb_check_encoding: 9.0599060058594E-6s bool(true) preg_match: 2.4795532226562E-5s bool(false)
Output for 5.3.5
mb_check_encoding: 1.4066696166992E-5s bool(true) preg_match: 1.0013580322266E-5s bool(false)
Output for 5.3.4
mb_check_encoding: 1.215934753418E-5s bool(true) preg_match: 1.0967254638672E-5s bool(false)
Output for 5.3.3
mb_check_encoding: 1.0013580322266E-5s bool(true) preg_match: 1.215934753418E-5s int(0)
Output for 5.3.2
mb_check_encoding: 1.1920928955078E-5s bool(true) preg_match: 1.0013580322266E-5s int(0)
Output for 5.3.1
mb_check_encoding: 1.1205673217773E-5s bool(true) preg_match: 1.1920928955078E-5s int(0)
Output for 5.2.16, 5.3.0
mb_check_encoding: 8.8214874267578E-6s bool(true) preg_match: 9.0599060058594E-6s int(0)
Output for 5.2.17
mb_check_encoding: 1.0013580322266E-5s bool(true) preg_match: 9.0599060058594E-6s int(0)
Output for 5.2.15
mb_check_encoding: 8.1062316894531E-6s bool(true) preg_match: 9.0599060058594E-6s int(0)
Output for 5.2.8, 5.2.14
mb_check_encoding: 9.0599060058594E-6s bool(true) preg_match: 9.0599060058594E-6s int(0)
Output for 5.2.13
mb_check_encoding: 1.1205673217773E-5s bool(true) preg_match: 8.8214874267578E-6s int(0)
Output for 5.2.12
mb_check_encoding: 1.215934753418E-5s bool(true) preg_match: 1.1920928955078E-5s int(0)
Output for 5.2.11
mb_check_encoding: 1.3113021850586E-5s bool(true) preg_match: 1.215934753418E-5s int(0)
Output for 5.2.10
mb_check_encoding: 1.0013580322266E-5s bool(true) preg_match: 3.0040740966797E-5s int(0)
Output for 5.2.9
mb_check_encoding: 9.0599060058594E-6s bool(true) preg_match: 1.0013580322266E-5s int(0)
Output for 5.2.7
mb_check_encoding: 1.0013580322266E-5s bool(true) preg_match: 2.0027160644531E-5s int(0)
Output for 5.2.6
mb_check_encoding: 1.4066696166992E-5s bool(true) preg_match: 2.4080276489258E-5s int(0)
Output for 5.2.5
mb_check_encoding: 1.3828277587891E-5s bool(true) preg_match: 9.0599060058594E-6s int(0)
Output for 5.2.4
mb_check_encoding: 1.2874603271484E-5s bool(true) preg_match: 2.8848648071289E-5s int(1)
Output for 5.2.3
mb_check_encoding: 2.6941299438477E-5s bool(true) preg_match: 1.5020370483398E-5s int(1)
Output for 5.2.2
mb_check_encoding: 1.3828277587891E-5s bool(true) preg_match: 1.215934753418E-5s int(1)
Output for 5.2.1
mb_check_encoding: 1.4066696166992E-05s bool(true) preg_match: 8.8214874267578E-06s int(1)
Output for 5.1.5, 5.2.0
mb_check_encoding: 1.0013580322266E-05s bool(true) preg_match: 1.0013580322266E-05s int(1)
Output for 5.1.6
mb_check_encoding: 1.0967254638672E-05s bool(true) preg_match: 1.2874603271484E-05s int(1)
Output for 5.1.4
mb_check_encoding: 1.5020370483398E-05s bool(true) preg_match: 1.0013580322266E-05s int(1)
Output for 5.1.3
mb_check_encoding: 1.1920928955078E-05s bool(true) preg_match: 1.1920928955078E-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/jFInn on line 7
Process exited with code 255.
Output for 4.4.9
mb_check_encoding: 1.9999999999909E-05s bool(true) preg_match: 1.0999999999983E-05s int(0)
Output for 4.4.8
mb_check_encoding: 1.7000000000045E-05s bool(true) preg_match: 2.4999999999942E-05s int(1)
Output for 4.4.7
mb_check_encoding: 1.7999999999962E-05s bool(true) preg_match: 1.400000000007E-05s int(1)
Output for 4.4.6
mb_check_encoding: 2.2999999999995E-05s bool(true) preg_match: 1.3999999999958E-05s int(1)
Output for 4.4.5
mb_check_encoding: 2.000000000002E-05s bool(true) preg_match: 1.2000000000012E-05s int(1)
Output for 4.4.4
mb_check_encoding: 2.3000000000106E-05s bool(true) preg_match: 1.400000000007E-05s int(1)
Output for 4.4.3
mb_check_encoding: 2.1999999999966E-05s bool(true) preg_match: 1.3000000000041E-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/jFInn 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/jFInn on line 7