3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function __construct() { var_dump('created!'); } } class Bar { public function getFoo() { static $foo; return $foo ?? ($foo = new Foo); } } $bar = new Bar; var_dump($bar->getFoo(), $bar->getFoo(), $bar->getFoo());

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)
8.3.60.0180.00016.63
8.3.50.0090.00921.99
8.3.40.0120.00318.61
8.3.30.0140.00018.48
8.3.20.0080.00020.20
8.3.10.0000.00823.65
8.3.00.0080.00019.36
8.2.180.0120.00918.29
8.2.170.0100.01022.96
8.2.160.0120.00320.52
8.2.150.0080.00025.66
8.2.140.0080.00024.66
8.2.130.0030.00617.63
8.2.120.0080.00026.35
8.2.110.0030.00620.48
8.2.100.0040.00717.93
8.2.90.0000.00919.08
8.2.80.0080.00017.97
8.2.70.0000.00817.63
8.2.60.0050.00317.93
8.2.50.0000.00818.07
8.2.40.0050.00319.28
8.2.30.0000.00720.59
8.2.20.0080.00017.73
8.2.10.0030.00518.12
8.2.00.0030.00518.04
8.1.280.0080.00825.92
8.1.270.0040.00423.96
8.1.260.0040.00428.09
8.1.250.0040.00428.09
8.1.240.0060.00323.93
8.1.230.0040.00819.57
8.1.220.0050.00317.74
8.1.210.0000.00818.77
8.1.200.0040.00417.35
8.1.190.0040.00717.21
8.1.180.0000.00818.10
8.1.170.0040.00418.62
8.1.160.0000.00722.06
8.1.150.0040.00418.89
8.1.140.0050.00319.61
8.1.130.0000.00817.70
8.1.120.0000.00717.39
8.1.110.0070.00017.42
8.1.100.0050.00217.29
8.1.90.0040.00417.38
8.1.80.0020.00517.26
8.1.70.0000.00717.34
8.1.60.0000.00817.43
8.1.50.0040.00417.52
8.1.40.0090.00017.41
8.1.30.0000.00917.50
8.1.20.0040.00417.60
8.1.10.0060.00317.62
8.1.00.0070.00417.51
8.0.300.0050.00218.77
8.0.290.0040.00416.63
8.0.280.0030.00318.50
8.0.270.0040.00417.27
8.0.260.0000.00717.18
8.0.250.0070.00017.00
8.0.240.0000.00916.84
8.0.230.0000.00816.83
8.0.220.0040.00316.86
8.0.210.0000.00816.80
8.0.200.0070.00016.89
8.0.190.0040.00416.95
8.0.180.0000.00716.88
8.0.170.0040.00416.93
8.0.160.0070.00017.00
8.0.150.0000.00716.72
8.0.140.0000.00716.81
8.0.130.0000.00613.36
8.0.120.0000.00816.96
8.0.110.0040.00416.86
8.0.100.0000.00816.75
8.0.90.0030.00516.89
8.0.80.0130.00616.95
8.0.70.0000.00716.85
8.0.60.0000.00716.83
8.0.50.0040.00416.71
8.0.30.0090.01116.98
8.0.20.0090.01017.41
8.0.10.0040.00417.12
8.0.00.0110.00816.90
7.4.330.0050.00016.67
7.4.320.0030.00316.52
7.4.300.0040.00416.59
7.4.290.0050.00216.51
7.4.280.0060.00316.63
7.4.270.0070.00016.61
7.4.260.0000.00716.56
7.4.250.0000.00816.46
7.4.240.0040.00416.56
7.4.230.0030.00316.34
7.4.220.0060.01116.63
7.4.210.0060.01016.53
7.4.200.0000.00716.48
7.4.160.0060.00916.62
7.4.150.0130.00317.40
7.4.140.0110.01117.86
7.4.130.0130.00316.54
7.4.120.0140.00616.52
7.4.110.0070.01116.47
7.4.100.0130.00316.61
7.4.90.0180.00016.37
7.4.80.0120.00819.39
7.4.70.0100.01316.57
7.4.60.0080.00816.38
7.4.50.0040.01216.30
7.4.40.0100.00616.23
7.4.30.0070.01016.47
7.4.00.0030.01014.98
7.3.330.0050.00013.16
7.3.320.0050.00013.24
7.3.310.0030.00516.36
7.3.300.0030.00316.23
7.3.290.0030.00316.14
7.3.280.0070.01216.22
7.3.270.0070.01117.40
7.3.260.0100.00716.60
7.3.250.0130.00516.36
7.3.240.0100.00716.24
7.3.230.0150.00316.39
7.3.210.0100.01016.51
7.3.200.0030.01616.14
7.3.190.0140.00416.17
7.3.180.0060.01516.11
7.3.170.0130.00716.27
7.3.160.0160.00016.15
7.3.10.0110.00316.38
7.3.00.0070.00716.35
7.2.330.0130.01016.32
7.2.320.0130.01016.32
7.2.310.0120.00616.46
7.2.300.0070.01716.56
7.2.290.0100.00716.69
7.2.130.0070.01116.52
7.2.120.0060.00616.50
7.2.110.0070.00416.52
7.2.100.0090.00616.77
7.2.90.0000.01416.86
7.2.80.0030.00616.88
7.2.70.0120.00316.86
7.2.60.0060.00816.76
7.2.50.0070.01016.55
7.2.40.0040.01116.87
7.2.30.0030.01416.91
7.2.20.0040.00816.87
7.2.10.0070.00716.75
7.2.00.0030.01017.92
7.1.250.0030.00915.68
7.1.200.0070.00315.48
7.1.100.0100.00317.89
7.1.70.0060.01017.11
7.1.60.0090.01519.48
7.1.50.0070.01716.66
7.1.00.0030.07322.28
7.0.200.0300.00314.48
7.0.60.0170.04319.85
7.0.50.0070.08317.87
7.0.40.0100.05320.27
7.0.30.0330.06720.20
7.0.20.0300.06020.07
7.0.10.0070.05720.07
7.0.00.0070.04320.09
5.6.280.0070.06321.14
5.6.210.0030.08320.54
5.6.200.0100.08318.18
5.6.190.0070.04020.61
5.6.180.0300.06320.51
5.6.170.0330.05720.71
5.6.160.0100.06320.54
5.6.150.0070.03318.19
5.6.140.0030.08318.25
5.6.130.0070.06718.18
5.6.120.0130.07721.03
5.6.110.0000.06720.96
5.6.100.0000.08721.19
5.6.90.0000.06720.96
5.6.80.0130.06720.45
5.5.350.0070.07720.47
5.5.340.0100.07717.95
5.5.330.0100.05720.28
5.5.320.0400.06720.30
5.5.310.0400.04320.34
5.5.300.0030.07317.98
5.5.290.0070.04318.08
5.5.280.0070.08320.89
5.5.270.0070.08320.98
5.5.260.0200.06320.77
5.5.250.0100.08320.78
5.5.240.0130.04020.20

preferences:
50.98 ms | 401 KiB | 5 Q