3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Main { private $N; public function run() { $this->N = 7777; $string = ''; for ( $i = $this->N; $i --> 0; ) { $string .= ' '; } } public function getTime() { $mtime = microtime(); $mtime = explode( ' ', $mtime ); $mtime = $mtime[1] + $mtime[0]; return $mtime; } } $Main = new Main(); $start = $Main->getTime(); $Main->run(); $end = $Main->getTime(); echo "Method execution took " . ( $end - $start ) . " seconds";
Output for 7.1.0
Method execution took 0.00021719932556152 seconds
Output for 7.0.14
Method execution took 0.00029397010803223 seconds
Output for 7.0.6
Method execution took 0.00020599365234375 seconds
Output for 7.0.5
Method execution took 0.00023603439331055 seconds
Output for 7.0.4
Method execution took 0.0002601146697998 seconds
Output for 7.0.3
Method execution took 0.0002288818359375 seconds
Output for 7.0.2
Method execution took 0.00025606155395508 seconds
Output for 7.0.1
Method execution took 0.00026082992553711 seconds
Output for 7.0.0
Method execution took 0.00027894973754883 seconds
Output for hhvm-3.12.0
Method execution took 0.00041103363037109 seconds
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.6.28
Method execution took 0.0005640983581543 seconds
Output for 5.6.21
Method execution took 0.0003511905670166 seconds
Output for 5.4.26, 5.6.15, 5.6.20
Method execution took 0.00033998489379883 seconds
Output for 5.6.19
Method execution took 0.00071120262145996 seconds
Output for 5.6.18
Method execution took 0.00034189224243164 seconds
Output for 5.6.17
Method execution took 0.00033307075500488 seconds
Output for 5.6.16
Method execution took 0.00033211708068848 seconds
Output for 5.6.14
Method execution took 0.0003969669342041 seconds
Output for 5.6.13
Method execution took 0.0003359317779541 seconds
Output for 5.6.12
Method execution took 0.00048184394836426 seconds
Output for 5.6.11
Method execution took 0.00050806999206543 seconds
Output for 5.6.10
Method execution took 0.00046801567077637 seconds
Output for 5.6.9
Method execution took 0.00054001808166504 seconds
Output for 5.5.33, 5.6.8
Method execution took 0.00053501129150391 seconds
Output for 5.5.35
Method execution took 0.00028395652770996 seconds
Output for 5.5.34
Method execution took 0.00042891502380371 seconds
Output for 5.5.32
Method execution took 0.00034284591674805 seconds
Output for 5.5.31
Method execution took 0.00049209594726562 seconds
Output for 5.5.30
Method execution took 0.00036406517028809 seconds
Output for 5.5.29
Method execution took 0.00037407875061035 seconds
Output for 5.4.24, 5.5.28
Method execution took 0.00033807754516602 seconds
Output for 5.2.5, 5.5.27
Method execution took 0.00054097175598145 seconds
Output for 5.4.3, 5.5.26
Method execution took 0.00061511993408203 seconds
Output for 5.5.25
Method execution took 0.00053191184997559 seconds
Output for 5.5.24
Method execution took 0.00053811073303223 seconds
Output for 5.4.45
Method execution took 0.00034403800964355 seconds
Output for 5.4.44
Method execution took 0.00047898292541504 seconds
Output for 5.4.43
Method execution took 0.0004727840423584 seconds
Output for 5.2.16, 5.4.39, 5.4.42
Method execution took 0.00049901008605957 seconds
Output for 5.4.41
Method execution took 0.0004730224609375 seconds
Output for 5.4.40
Method execution took 0.0055031776428223 seconds
Output for 5.3.4, 5.4.38
Method execution took 0.00063991546630859 seconds
Output for 5.3.10, 5.4.37
Method execution took 0.00056695938110352 seconds
Output for 5.4.36
Method execution took 0.00054311752319336 seconds
Output for 5.4.35
Method execution took 0.00052785873413086 seconds
Output for 5.4.34
Method execution took 0.00071907043457031 seconds
Output for 5.4.32
Method execution took 0.00034999847412109 seconds
Output for 5.4.31
Method execution took 0.00038504600524902 seconds
Output for 5.4.30
Method execution took 0.00033879280090332 seconds
Output for 5.4.29
Method execution took 0.00037288665771484 seconds
Output for 5.4.28
Method execution took 0.00035715103149414 seconds
Output for 5.4.27
Method execution took 0.00038385391235352 seconds
Output for 5.4.25
Method execution took 0.00056600570678711 seconds
Output for 5.4.23
Method execution took 0.0006709098815918 seconds
Output for 5.4.22
Method execution took 0.00065207481384277 seconds
Output for 5.4.21
Method execution took 0.0005650520324707 seconds
Output for 5.4.20
Method execution took 0.0003819465637207 seconds
Output for 5.4.19
Method execution took 0.00053215026855469 seconds
Output for 5.4.18
Method execution took 0.00040602684020996 seconds
Output for 5.4.17
Method execution took 0.00070500373840332 seconds
Output for 5.4.16
Method execution took 0.00056195259094238 seconds
Output for 5.4.15
Method execution took 0.00057291984558105 seconds
Output for 5.4.14
Method execution took 0.00066995620727539 seconds
Output for 5.4.13
Method execution took 0.00035214424133301 seconds
Output for 5.4.12
Method execution took 0.00037717819213867 seconds
Output for 5.4.11
Method execution took 0.00051712989807129 seconds
Output for 5.4.10
Method execution took 0.013231039047241 seconds
Output for 5.4.9
Method execution took 0.00048398971557617 seconds
Output for 5.4.8
Method execution took 0.00054693222045898 seconds
Output for 5.4.7
Method execution took 0.00055193901062012 seconds
Output for 5.4.6
Method execution took 0.00060391426086426 seconds
Output for 5.4.5
Method execution took 0.0075960159301758 seconds
Output for 5.4.4
Method execution took 0.00055813789367676 seconds
Output for 5.4.2
Method execution took 0.00060105323791504 seconds
Output for 5.4.1
Method execution took 0.00057697296142578 seconds
Output for 5.4.0
Method execution took 0.00053620338439941 seconds
Output for 5.3.29
Method execution took 0.0004270076751709 seconds
Output for 5.3.28
Method execution took 0.0076589584350586 seconds
Output for 5.3.27
Method execution took 0.00037813186645508 seconds
Output for 5.3.26
Method execution took 0.00042486190795898 seconds
Output for 5.3.25
Method execution took 0.00055789947509766 seconds
Output for 5.3.24
Method execution took 0.00044703483581543 seconds
Output for 5.3.23
Method execution took 0.00077700614929199 seconds
Output for 5.3.22
Method execution took 0.00072789192199707 seconds
Output for 5.3.21
Method execution took 0.00069689750671387 seconds
Output for 5.3.20
Method execution took 0.00071597099304199 seconds
Output for 5.3.19
Method execution took 0.00063014030456543 seconds
Output for 5.3.18
Method execution took 0.00067782402038574 seconds
Output for 5.3.17
Method execution took 0.00049114227294922 seconds
Output for 5.3.16
Method execution took 0.00066208839416504 seconds
Output for 5.3.15
Method execution took 0.00054717063903809 seconds
Output for 5.3.14
Method execution took 0.00066399574279785 seconds
Output for 5.3.13
Method execution took 0.00079107284545898 seconds
Output for 5.3.12
Method execution took 0.00039792060852051 seconds
Output for 5.3.11
Method execution took 0.00076103210449219 seconds
Output for 5.3.9
Method execution took 0.00073003768920898 seconds
Output for 5.3.8
Method execution took 0.0003349781036377 seconds
Output for 5.3.7
Method execution took 0.0010471343994141 seconds
Output for 5.3.6
Method execution took 0.00063800811767578 seconds
Output for 5.3.5
Method execution took 0.00079178810119629 seconds
Output for 5.3.3
Method execution took 0.00082302093505859 seconds
Output for 5.3.2
Method execution took 0.00035810470581055 seconds
Output for 5.3.1
Method execution took 0.00043892860412598 seconds
Output for 5.3.0
Method execution took 0.00069999694824219 seconds
Output for 5.2.17
Method execution took 0.00088596343994141 seconds
Output for 5.2.15
Method execution took 0.00089788436889648 seconds
Output for 5.2.14
Method execution took 0.00099992752075195 seconds
Output for 5.2.13
Method execution took 0.00060606002807617 seconds
Output for 5.2.12
Method execution took 0.00092196464538574 seconds
Output for 5.2.11
Method execution took 0.0010659694671631 seconds
Output for 5.2.10
Method execution took 0.0011439323425293 seconds
Output for 5.2.9
Method execution took 0.0010108947753906 seconds
Output for 5.2.8
Method execution took 0.00055503845214844 seconds
Output for 5.2.7
Method execution took 0.00056791305541992 seconds
Output for 5.2.6
Method execution took 0.0005800724029541 seconds
Output for 5.2.4
Method execution took 0.0010209083557129 seconds
Output for 5.2.3
Method execution took 0.00059294700622559 seconds
Output for 5.2.2
Method execution took 0.0012569427490234 seconds
Output for 5.2.1
Method execution took 0.0010068416595459 seconds
Output for 5.2.0
Method execution took 0.0011229515075684 seconds
Output for 5.1.6
Method execution took 0.0079798698425293 seconds
Output for 5.1.5
Method execution took 0.0011680126190186 seconds
Output for 5.1.4
Method execution took 0.00070691108703613 seconds
Output for 5.1.3
Method execution took 0.00069499015808105 seconds
Output for 5.1.2
Method execution took 0.00067520141601562 seconds
Output for 5.1.1
Method execution took 0.00070095062255859 seconds
Output for 5.1.0
Method execution took 0.00097417831420898 seconds
Output for 5.0.5
Method execution took 0.0015177726745605 seconds
Output for 5.0.4
Method execution took 0.0023620128631592 seconds
Output for 5.0.3
Method execution took 0.0014231204986572 seconds
Output for 5.0.2
Method execution took 0.0019922256469727 seconds
Output for 5.0.1
Method execution took 0.0018301010131836 seconds
Output for 5.0.0
Method execution took 0.0014891624450684 seconds
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/luAep 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_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/luAep 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/luAep on line 5
Process exited with code 255.