3v4l.org

run code in 300+ PHP versions simultaneously
<?php class cat {public $name = "";public function setName($name) {$this->name = $name; }public function getName() {return $this->name; } }$rover = new cat();for ($x=0; $x<10; $x++) { $t = microtime(true);for ($i=0; $i<1000000; $i++) { $rover->setName("rover");$n = $rover->getName();}echo microtime(true) - $t;echo "\n";} class dog { public $name = "";} $rover = new dog(); for ($x=0; $x<10; $x++) { $t = microtime(true); for ($i=0; $i<1000000; $i++) { $rover->name = "rover"; $n = $rover->name;} echo microtime(true) - $t;echo "\n";}

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
7.3.10.0031.15116.54
7.3.00.0071.27416.71
7.2.130.0071.19917.00
7.2.120.0321.09416.79
7.2.110.0131.19516.86
7.2.100.0071.20416.81
7.2.90.0131.17117.15
7.2.80.0101.11016.96
7.2.70.0101.11516.75
7.2.60.0101.10017.00
7.2.50.0101.09217.07
7.2.40.0071.07017.04
7.2.30.0171.06717.00
7.2.20.0031.12217.15
7.2.10.0131.13916.59
7.2.00.0030.96018.05
7.1.250.0102.44915.80
7.1.240.0002.41415.79
7.1.230.0102.48615.68
7.1.220.0102.48715.75
7.1.210.0172.42515.52
7.1.200.0032.41915.78
7.1.190.0032.47715.64
7.1.180.0002.49615.66
7.1.170.0132.37915.79
7.1.160.0102.42815.57
7.1.150.0102.38915.70
7.1.140.0072.40215.68
7.1.130.0172.39315.81
7.1.120.0032.49315.70
7.1.110.0032.45616.00
7.1.100.0172.45315.66
7.1.90.0072.49015.68
7.1.80.0172.43315.84
7.1.70.0071.70816.33
7.1.60.0401.68017.32
7.1.50.0171.74925.22
7.1.40.0102.38315.55
7.1.30.0132.37215.76
7.1.20.0102.37115.69
7.1.10.0132.36315.33
7.1.00.0151.55019.13
7.0.330.0102.33515.51
7.0.320.0072.34715.48
7.0.310.0072.38115.12
7.0.300.0072.36315.57
7.0.290.0172.38115.41
7.0.280.0132.36515.21
7.0.270.0072.32515.50
7.0.260.0102.45915.47
7.0.250.0032.36615.14
7.0.240.0032.40615.63
7.0.230.0172.46615.49
7.0.220.0102.41215.45
7.0.210.0102.38315.43
7.0.200.0031.71816.23
7.0.190.0102.43015.56
7.0.180.0032.42215.39
7.0.170.0032.39315.55
7.0.160.0202.39115.44
7.0.150.0102.32715.45
7.0.140.0051.65618.68
7.0.130.0102.33515.17
7.0.120.0051.62718.72
7.0.110.0032.37615.11
7.0.100.0051.53817.67
7.0.90.0071.64817.54
7.0.80.0071.63417.70
7.0.70.0131.57917.58
7.0.60.0081.67217.66
7.0.50.0081.59417.86
7.0.40.0101.67616.60
7.0.30.0071.61216.78
7.0.20.0131.66416.84
7.0.10.0071.66216.63
7.0.00.0131.68716.71
5.6.380.0032.49414.41
5.6.370.0032.49314.56
5.6.360.0102.48814.63
5.6.350.0032.49414.45
5.6.340.0072.49114.40
5.6.330.0002.49814.55
5.6.320.0032.49314.46
5.6.310.0032.46114.20
5.6.300.0002.45414.54
5.6.290.0002.46714.57
5.6.280.0052.47917.68
5.6.270.0102.47014.31
5.6.260.0032.46014.61
5.6.250.0032.41717.58
5.6.240.0102.39017.57
5.6.230.1102.34517.54
5.6.220.0052.47117.47
5.6.210.0032.39517.37
5.6.200.0022.40917.54
5.6.190.0082.49017.76
5.6.180.0082.45917.68
5.6.170.0082.37217.51
5.6.160.1222.30917.86
5.6.150.0072.38017.61
5.6.140.0122.37217.80
5.6.130.0132.34217.83
5.6.120.0082.32617.77
5.6.110.0152.38717.70
5.6.100.0072.36717.65
5.6.90.0052.38317.67
5.6.80.0152.32217.38
5.6.70.0072.36917.35
5.6.60.0132.35817.28
5.6.50.0122.37317.39
5.6.40.0102.41617.51
5.6.30.0082.40117.22
5.6.20.0152.40617.45
5.6.10.0102.44717.33
5.6.00.0072.42117.38
5.5.380.0082.49015.79
5.5.370.0072.45015.87
5.5.360.0052.31815.83
5.5.350.0052.40615.76
5.5.340.0052.42115.77
5.5.330.0102.44315.94
5.5.320.0122.42416.08
5.5.310.0082.47616.00
5.5.300.0132.45815.81
5.5.290.1252.35815.95
5.5.280.0082.45216.04
5.5.270.0122.45115.93
5.5.260.0122.45116.15
5.5.250.0122.44315.74
5.5.240.0152.41415.70
5.5.230.0152.41215.62
5.5.220.0102.41815.68
5.5.210.0492.32015.61
5.5.200.0132.45615.54
5.5.190.0022.45415.71
5.5.180.0202.42315.64
5.5.170.0102.41711.29
5.5.160.0122.33315.72
5.5.150.0072.42215.73
5.5.140.0082.47515.71
5.5.130.0122.41515.74
5.5.120.0122.42715.74
5.5.110.0072.39115.78
5.5.100.0102.40915.51
5.5.90.0032.45315.68
5.5.80.0072.39715.54
5.5.70.0152.36115.42
5.5.60.0072.34815.55
5.5.50.0122.41215.49
5.5.40.0132.41115.67
5.5.30.0102.46915.42
5.5.20.0072.43815.51
5.5.10.0132.43415.51
5.5.00.0102.44515.49
5.4.450.0032.37915.22
5.4.440.0082.40115.27
5.4.430.0072.40615.16
5.4.420.0152.35715.19
5.4.410.0122.37615.13
5.4.400.0082.38514.95
5.4.390.0152.46215.00
5.4.380.0032.42715.03
5.4.370.0102.34714.98
5.4.360.0032.34914.97
5.4.350.0082.36415.08
5.4.340.0082.42515.11
5.4.330.0102.38311.22
5.4.320.0122.33015.27
5.4.310.0082.47015.15
5.4.300.0132.44615.07
5.4.290.0052.44715.01
5.4.280.0102.37815.10
5.4.270.0132.44815.06
5.4.260.0152.45114.97
5.4.250.0182.39015.02
5.4.240.0102.39814.94
5.4.230.0152.37515.19
5.4.220.0132.42314.92
5.4.210.0052.46814.98
5.4.200.0122.44514.99
5.4.190.0122.42614.94
5.4.180.0102.43015.16
5.4.170.0072.38814.98
5.4.160.0082.29814.82
5.4.150.0102.40714.93
5.4.140.0102.36013.68
5.4.130.0022.49613.51
5.4.120.0102.42513.83
5.4.110.0102.40513.61
5.4.100.0082.44213.93
5.4.90.0102.36013.78
5.4.80.0022.43313.76
5.4.70.0082.37213.79
5.4.60.0152.38313.75
5.4.50.0522.39513.80
5.4.40.0122.29313.61
5.4.30.0082.43713.70
5.4.20.0122.34113.65
5.4.10.0082.40013.79
5.4.00.0182.42213.43
5.3.290.0182.42812.42
5.3.280.0052.48212.27
5.3.270.0082.48912.55
5.3.260.0022.49012.49
5.3.250.0102.44512.50
5.3.240.0222.43412.46
5.3.230.0082.48612.31
5.3.220.0082.47112.33
5.3.210.0072.49312.41
5.3.200.0132.45812.35
5.3.190.0072.48312.36
5.3.180.0102.49012.37
5.3.170.0122.45212.44
5.3.160.0132.42512.33
5.3.150.0052.48412.44
5.3.140.0052.48612.40
5.3.130.0082.48412.40
5.3.120.0072.47012.42
5.3.110.0102.46512.45
5.3.100.0072.46512.13
5.3.90.0162.40612.26
5.3.80.0172.47412.10
5.3.70.0222.43012.03
5.3.60.0082.47812.01
5.3.50.0182.39111.96
5.3.40.0172.40012.07
5.3.30.0182.37511.98
5.3.20.0192.38911.95
5.3.10.0252.37011.86
5.3.00.0132.42111.78
5.2.170.0132.41010.17
5.2.160.0202.39810.12
5.2.150.0162.39910.15
5.2.140.0232.4249.84
5.2.130.0152.40210.06
5.2.120.0182.38410.16
5.2.110.0272.40010.11
5.2.100.0082.38010.06
5.2.90.0172.39610.01
5.2.80.0082.4599.96
5.2.70.0102.4719.80
5.2.60.0182.4189.98
5.2.50.0112.4469.94
5.2.40.0122.4439.89
5.2.30.0172.3869.92
5.2.20.0232.40510.00
5.2.10.0162.3969.87
5.2.00.0052.4629.82
5.1.60.0132.4199.03
5.1.50.0122.4069.12
5.1.40.0132.4069.08
5.1.30.0102.4589.30
5.1.20.0082.4539.38
5.1.10.0072.4759.10
5.1.00.0162.4099.04
5.0.50.0052.4478.31
5.0.40.0032.4688.28
5.0.30.0102.4478.14
5.0.20.0052.4718.16
5.0.10.0122.4348.13
5.0.00.0182.3858.17
4.4.90.0050.0158.47
4.4.80.0050.0128.47
4.4.70.0060.0178.47
4.4.60.0070.0178.47
4.4.50.0020.0158.47
4.4.40.0050.0228.47
4.4.30.0070.0197.95
4.4.20.0050.0157.95
4.4.10.0040.0197.95
4.4.00.0020.0137.95
4.3.110.0040.0087.95
4.3.100.0040.0157.95
4.3.90.0050.0077.95
4.3.80.0070.0287.95
4.3.70.0040.0107.95
4.3.60.0080.0167.95
4.3.50.0050.0187.95
4.3.40.0100.0187.95
4.3.30.0100.0127.95
4.3.20.0110.0177.95
4.3.10.0070.0227.95
4.3.00.0050.0177.95

preferences:
32.46 ms | 401 KiB | 5 Q