3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class X { const TYPE = 'x'; } class Y { const TYPE = 'y'; } $y = new Y(); $x = new X(); $time = microtime(true); echo ($y::TYPE === 'y'); echo ($y::TYPE === 'x'); $time = microtime(true) - $time; echo '1 took '. $time; echo "\n"; $time = microtime(true); echo ($y instanceof Y); echo ($y instanceof X); $time = microtime(true) - $time; echo '2 took '. $time;
based on cmJn7
Output for 5.5.30, 7.1.0
11 took 1.5020370483398E-5 12 took 1.9073486328125E-6
Output for 5.5.33, 5.6.8, 7.0.14
11 took 1.6927719116211E-5 12 took 1.9073486328125E-6
Output for 7.0.6
11 took 1.5020370483398E-5 12 took 9.5367431640625E-7
Output for 5.5.31, 7.0.5
11 took 1.3828277587891E-5 12 took 9.5367431640625E-7
Output for 5.5.27, 5.6.14, 7.0.3 - 7.0.4
11 took 1.1920928955078E-5 12 took 9.5367431640625E-7
Output for 7.0.2
11 took 1.1920928955078E-5 12 took 0
Output for 7.0.1
11 took 1.4781951904297E-5 12 took 0
Output for 5.6.12, 7.0.0
11 took 1.6927719116211E-5 12 took 9.5367431640625E-7
Output for hhvm-3.12.0
11 took 0.00012993812561035 12 took 1.6212463378906E-5
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.5.34, 5.6.28
11 took 1.7166137695312E-5 12 took 1.9073486328125E-6
Output for 5.6.21
11 took 1.7166137695312E-5 12 took 9.5367431640625E-7
Output for 5.6.20
11 took 1.2874603271484E-5 12 took 9.5367431640625E-7
Output for 5.6.19
11 took 1.3113021850586E-5 12 took 1.1920928955078E-6
Output for 5.6.18
11 took 1.5974044799805E-5 12 took 2.1457672119141E-6
Output for 5.6.17
11 took 1.5020370483398E-5 12 took 1.1920928955078E-6
Output for 5.5.26, 5.5.28, 5.6.16
11 took 1.5020370483398E-5 12 took 2.1457672119141E-6
Output for 5.6.11, 5.6.15
11 took 1.4066696166992E-5 12 took 2.1457672119141E-6
Output for 5.6.13
11 took 1.3113021850586E-5 12 took 9.5367431640625E-7
Output for 5.6.10
11 took 1.5974044799805E-5 12 took 1.9073486328125E-6
Output for 5.5.29, 5.6.9
11 took 1.8119812011719E-5 12 took 1.9073486328125E-6
Output for 5.6.7
11 took 1.5974044799805E-5 12 took 9.5367431640625E-7
Output for 5.5.35
11 took 1.215934753418E-5 12 took 9.5367431640625E-7
Output for 5.5.32
11 took 1.4066696166992E-5 12 took 1.1920928955078E-6
Output for 5.5.25
11 took 1.0967254638672E-5 12 took 9.5367431640625E-7
Output for 5.5.24
11 took 1.978874206543E-5 12 took 1.9073486328125E-6
Output for 5.4.45
11 took 4.3153762817383E-5 12 took 1.9073486328125E-6
Output for 5.4.44
11 took 7.0095062255859E-5 12 took 3.3855438232422E-5
Output for 5.4.43
11 took 0.00017809867858887 12 took 6.4849853515625E-5
Output for 5.4.42
11 took 8.9883804321289E-5 12 took 1.1920928955078E-5
Output for 5.4.41
11 took 0.00012111663818359 12 took 1.215934753418E-5
Output for 5.4.40
11 took 0.00012993812561035 12 took 1.1920928955078E-5
Output for 5.4.30, 5.4.39
11 took 6.103515625E-5 12 took 1.0967254638672E-5
Output for 5.4.38
11 took 6.103515625E-5 12 took 4.0531158447266E-6
Output for 5.4.37
11 took 4.5061111450195E-5 12 took 2.1457672119141E-6
Output for 5.4.36
11 took 0.00012111663818359 12 took 2.288818359375E-5
Output for 5.4.35
11 took 7.7962875366211E-5 12 took 3.6001205444336E-5
Output for 5.4.34
11 took 4.8160552978516E-5 12 took 5.9604644775391E-6
Output for 5.4.10, 5.4.32
11 took 6.6995620727539E-5 12 took 1.1920928955078E-5
Output for 5.4.31
11 took 6.2942504882812E-5 12 took 8.8214874267578E-6
Output for 5.4.29
11 took 5.2928924560547E-5 12 took 5.9604644775391E-6
Output for 5.3.7, 5.3.12, 5.4.9, 5.4.28
11 took 6.103515625E-5 12 took 6.9141387939453E-6
Output for 5.4.27
11 took 4.7206878662109E-5 12 took 5.9604644775391E-6
Output for 5.4.26
11 took 8.8930130004883E-5 12 took 9.0599060058594E-6
Output for 5.4.25
11 took 6.0081481933594E-5 12 took 1.0013580322266E-5
Output for 5.4.24
11 took 5.1021575927734E-5 12 took 1.0013580322266E-5
Output for 5.4.23
11 took 6.1988830566406E-5 12 took 7.1525573730469E-6
Output for 5.3.9, 5.4.22
11 took 5.1975250244141E-5 12 took 6.9141387939453E-6
Output for 5.4.21
11 took 6.7949295043945E-5 12 took 1.1920928955078E-5
Output for 5.4.20
11 took 6.1988830566406E-5 12 took 5.9604644775391E-6
Output for 5.4.19
11 took 6.413459777832E-5 12 took 6.9141387939453E-6
Output for 5.4.18
11 took 8.0108642578125E-5 12 took 7.1525573730469E-6
Output for 5.4.17
11 took 6.6995620727539E-5 12 took 5.9604644775391E-6
Output for 5.4.16
11 took 5.793571472168E-5 12 took 1.9073486328125E-6
Output for 5.4.15
11 took 5.9843063354492E-5 12 took 0
Output for 5.4.14
11 took 5.793571472168E-5 12 took 1.0967254638672E-5
Output for 5.4.13
11 took 5.4121017456055E-5 12 took 1.0013580322266E-5
Output for 5.4.12
11 took 5.1975250244141E-5 12 took 5.9604644775391E-6
Output for 5.4.11
11 took 6.1988830566406E-5 12 took 3.3140182495117E-5
Output for 5.4.8
11 took 5.8174133300781E-5 12 took 6.9141387939453E-6
Output for 5.4.7
11 took 5.793571472168E-5 12 took 8.1062316894531E-6
Output for 5.4.6
11 took 5.6028366088867E-5 12 took 6.9141387939453E-6
Output for 5.4.5
11 took 5.3882598876953E-5 12 took 5.0067901611328E-6
Output for 5.4.4
11 took 7.2002410888672E-5 12 took 7.1525573730469E-6
Output for 5.4.3
11 took 5.6028366088867E-5 12 took 7.8678131103516E-6
Output for 5.4.2
11 took 6.0081481933594E-5 12 took 6.9141387939453E-6
Output for 5.4.1
11 took 6.413459777832E-5 12 took 7.1525573730469E-6
Output for 5.4.0
11 took 5.9843063354492E-5 12 took 5.0067901611328E-6
Output for 5.3.29
11 took 4.1007995605469E-5 12 took 6.9141387939453E-6
Output for 5.3.28
11 took 4.5061111450195E-5 12 took 5.9604644775391E-6
Output for 5.3.27
11 took 5.6028366088867E-5 12 took 6.1988830566406E-6
Output for 5.3.26
11 took 5.3167343139648E-5 12 took 5.9604644775391E-6
Output for 5.3.25
11 took 5.5074691772461E-5 12 took 4.0531158447266E-6
Output for 5.3.24
11 took 5.793571472168E-5 12 took 6.9141387939453E-6
Output for 5.3.23
11 took 6.0796737670898E-5 12 took 1.4066696166992E-5
Output for 5.3.22
11 took 4.9114227294922E-5 12 took 5.9604644775391E-6
Output for 5.3.21
11 took 4.6968460083008E-5 12 took 5.9604644775391E-6
Output for 5.3.20
11 took 5.4121017456055E-5 12 took 7.8678131103516E-6
Output for 5.3.19
11 took 4.6968460083008E-5 12 took 6.9141387939453E-6
Output for 5.3.18
11 took 5.4121017456055E-5 12 took 6.1988830566406E-6
Output for 5.3.17
11 took 5.4121017456055E-5 12 took 7.1525573730469E-6
Output for 5.3.16
11 took 5.3882598876953E-5 12 took 7.1525573730469E-6
Output for 5.3.15
11 took 4.8160552978516E-5 12 took 5.0067901611328E-6
Output for 5.3.14
11 took 5.1021575927734E-5 12 took 6.9141387939453E-6
Output for 5.3.13
11 took 6.1988830566406E-5 12 took 3.0994415283203E-6
Output for 5.3.11
11 took 6.1988830566406E-5 12 took 0
Output for 5.3.10
11 took 5.1975250244141E-5 12 took 5.0067901611328E-6
Output for 5.3.8
11 took 4.6968460083008E-5 12 took 8.1062316894531E-6
Output for 5.3.6
11 took 5.8889389038086E-5 12 took 7.8678131103516E-6
Output for 5.3.5
11 took 5.1975250244141E-5 12 took 8.1062316894531E-6
Output for 5.3.4
11 took 5.1021575927734E-5 12 took 7.8678131103516E-6
Output for 5.3.2 - 5.3.3
11 took 6.6041946411133E-5 12 took 6.9141387939453E-6
Output for 5.3.1
11 took 4.9829483032227E-5 12 took 7.1525573730469E-6
Output for 5.3.0
11 took 4.7922134399414E-5 12 took 6.9141387939453E-6
Output for 5.1.0 - 5.2.17
Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in /in/1NcAC on line 17
Process exited with code 255.
Output for 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_PAAMAYIM_NEKUDOTAYIM in /in/1NcAC on line 17
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_CONST, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/1NcAC on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_CONST, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/1NcAC on line 5
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /in/1NcAC on line 5
Process exited with code 255.