3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function __get($var) { if ($var === 'foo') { return 'bar!'; } return null; } } $fooInst = new Foo(); $empty = empty($fooInst->foo) ? "empty" : "not empty"; print "direct call: $empty \n"; $val = $fooInst->foo; $empty = empty($val) ? "empty" : "not empty"; print "indirect call: $empty\n"; print "val: $val\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)
8.3.60.0090.00618.16
8.3.50.0100.00921.14
8.3.40.0120.00618.70
8.3.30.0120.00820.21
8.3.20.0090.00020.54
8.3.10.0030.00521.11
8.3.00.0050.00323.70
8.2.180.0060.01218.41
8.2.170.0070.00722.96
8.2.160.0070.00720.35
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0060.00326.16
8.2.120.0040.00421.03
8.2.110.0100.00022.25
8.2.100.0090.00318.22
8.2.90.0000.00817.75
8.2.80.0040.00417.97
8.2.70.0030.00517.93
8.2.60.0040.00418.22
8.2.50.0000.00818.10
8.2.40.0000.00819.14
8.2.30.0040.00419.36
8.2.20.0000.00817.53
8.2.10.0040.00417.71
8.2.00.0050.00217.74
8.1.280.0130.00625.92
8.1.270.0050.00323.99
8.1.260.0070.00026.35
8.1.250.0080.00028.09
8.1.240.0000.00823.93
8.1.230.0070.00422.13
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0060.00317.23
8.1.190.0030.00517.12
8.1.180.0000.00818.10
8.1.170.0000.00818.65
8.1.160.0000.00718.74
8.1.150.0080.00318.61
8.1.140.0000.01117.44
8.1.130.0030.00317.79
8.1.120.0040.00417.36
8.1.110.0000.00717.27
8.1.100.0040.00417.28
8.1.90.0040.00417.22
8.1.80.0050.00217.31
8.1.70.0030.00317.36
8.1.60.0060.00317.56
8.1.50.0040.00417.54
8.1.40.0000.00917.50
8.1.30.0030.00617.63
8.1.20.0030.00517.69
8.1.10.0060.00317.53
8.1.00.0040.00417.38
8.0.300.0000.00719.65
8.0.290.0000.01016.63
8.0.280.0030.00318.43
8.0.270.0000.00817.27
8.0.260.0070.00416.80
8.0.250.0000.00716.92
8.0.240.0040.00416.86
8.0.230.0000.00716.85
8.0.220.0080.00016.78
8.0.210.0000.00716.85
8.0.200.0000.00716.81
8.0.190.0070.00016.84
8.0.180.0040.00416.76
8.0.170.0030.00516.96
8.0.160.0070.00016.88
8.0.150.0050.00316.84
8.0.140.0030.00616.75
8.0.130.0060.00013.36
8.0.120.0030.00616.89
8.0.110.0040.00416.77
8.0.100.0020.00516.71
8.0.90.0050.00316.92
8.0.80.0060.01016.86
8.0.70.0000.00716.91
8.0.60.0040.00416.93
8.0.50.0040.00416.71
8.0.30.0120.00617.18
8.0.20.0090.01417.40
8.0.10.0050.00316.76
8.0.00.0110.00716.72
7.4.330.0060.00015.05
7.4.320.0000.00716.46
7.4.300.0030.00316.51
7.4.290.0030.00316.58
7.4.280.0000.00716.54
7.4.270.0030.00316.65
7.4.260.0000.00713.29
7.4.250.0030.00616.46
7.4.240.0030.00316.61
7.4.230.0050.00316.32
7.4.220.0040.01516.45
7.4.210.0090.00516.49
7.4.200.0070.00016.46
7.4.190.0050.00216.64
7.4.160.0130.00316.46
7.4.150.0100.00617.40
7.4.140.0050.01317.86
7.4.130.0080.00816.59
7.4.120.0080.00916.51
7.4.110.0100.00716.52
7.4.100.0070.01316.47
7.4.90.0120.00616.47
7.4.80.0130.00319.39
7.4.70.0100.00716.43
7.4.60.0090.00916.58
7.4.50.0000.00816.19
7.4.40.0070.01022.77
7.4.30.0100.00716.64
7.4.00.0060.00915.02
7.3.330.0000.00513.32
7.3.320.0000.00513.34
7.3.310.0070.00016.31
7.3.300.0000.00616.13
7.3.290.0090.00916.34
7.3.280.0100.00916.31
7.3.270.0040.01417.40
7.3.260.0080.01018.24
7.3.250.0110.00816.39
7.3.240.0100.00616.32
7.3.230.0100.00716.39
7.3.210.0140.00316.31
7.3.200.0070.01019.39
7.3.190.0070.01116.56
7.3.180.0100.00616.55
7.3.170.0140.00316.34
7.3.160.0140.00716.38
7.3.120.0070.00414.87
7.3.10.0030.01016.64
7.3.00.0060.00916.30
7.2.330.0070.01016.50
7.2.320.0120.00916.78
7.2.310.0000.02116.39
7.2.300.0060.01616.45
7.2.290.0160.00016.71
7.2.130.0040.00416.71
7.2.120.0090.00316.59
7.2.110.0060.00316.89
7.2.100.0130.00016.80
7.2.90.0080.00016.95
7.2.80.0090.00316.71
7.2.70.0030.00716.91
7.2.60.0060.00917.07
7.2.50.0090.00917.09
7.2.40.0100.00516.81
7.2.30.0100.00717.11
7.2.20.0070.00716.70
7.2.10.0060.00816.88
7.2.00.0020.01418.16
7.1.250.0040.00715.59
7.1.240.0090.00615.56
7.1.230.0000.01515.48
7.1.220.0090.00615.66
7.1.210.0000.01315.55
7.1.200.0150.00015.57
7.1.190.0030.01015.52
7.1.180.0070.00715.60
7.1.170.0080.00415.66
7.1.160.0070.00715.53
7.1.150.0000.01315.64
7.1.140.0040.00815.72
7.1.130.0060.00615.54
7.1.120.0070.00715.88
7.1.110.0110.00015.51
7.1.100.0030.00916.80
7.1.90.0030.00915.57
7.1.80.0130.00715.75
7.1.70.0050.00416.22
7.1.60.0070.01017.24
7.1.50.0080.01216.36
7.1.40.0040.00715.38
7.1.30.0070.00715.68
7.1.20.0030.00915.60
7.1.10.0030.01015.32
7.1.00.0020.03818.99
7.0.330.0030.01015.39
7.0.320.0040.00415.21
7.0.310.0120.00315.56
7.0.300.0000.01415.42
7.0.290.0070.00315.37
7.0.280.0060.00315.35
7.0.270.0030.00915.30
7.0.260.0110.00315.38
7.0.250.0000.01415.52
7.0.240.0060.00615.41
7.0.230.0100.00715.52
7.0.220.0090.00615.52
7.0.210.0040.01115.55
7.0.200.0020.00616.12
7.0.190.0090.00615.31
7.0.180.0130.00615.48
7.0.170.0060.00615.44
7.0.160.0030.01015.39
7.0.150.0000.01115.53
7.0.140.0070.03818.69
7.0.130.0060.00615.38
7.0.120.0000.01015.55
7.0.110.0000.01015.35
7.0.100.0060.04217.58
7.0.90.0080.04317.57
7.0.80.0070.02517.83
7.0.70.0130.02317.82
7.0.60.0050.02517.68
7.0.50.0050.02417.96
7.0.40.0000.02416.64
7.0.30.0030.02416.83
7.0.20.0070.02516.89
7.0.10.0120.02716.75
7.0.00.0050.02116.77
5.6.380.0060.00914.29
5.6.370.0000.01014.23
5.6.360.0030.00714.27
5.6.350.0050.00314.38
5.6.340.0070.00014.43
5.6.330.0060.00314.32
5.6.320.0030.00514.26
5.6.310.0080.00614.32
5.6.300.0040.00814.60
5.6.290.0040.00413.97
5.6.280.0090.03617.49
5.6.270.0040.00714.10
5.6.260.0060.00614.24
5.6.250.0090.03917.23
5.6.240.0050.04517.31
5.6.230.0050.04517.33
5.6.220.0050.02217.37
5.6.210.0080.01817.27
5.6.200.0070.01917.65
5.6.190.0050.02617.69
5.6.180.0000.02417.56
5.6.170.0080.02017.64
5.6.160.0050.02017.63
5.6.150.0050.02317.82
5.6.140.0030.02617.71
5.6.130.0060.02317.45
5.6.120.0030.02717.59
5.6.110.0100.01817.72
5.6.100.0070.02417.58
5.6.90.0030.03517.56
5.6.80.0050.02317.33
5.6.70.0000.02917.12
5.6.60.0030.02317.26
5.6.50.0030.02317.22
5.6.40.0100.01817.28
5.6.30.0030.02517.23
5.6.20.0070.02517.41
5.6.10.0070.02617.17
5.6.00.0090.02117.37
5.5.380.0050.02515.65
5.5.370.0060.02315.69
5.5.360.0080.02215.78
5.5.350.0070.02215.66
5.5.340.0030.02316.02
5.5.330.0020.02815.79
5.5.320.0030.01815.93
5.5.310.0020.02316.10
5.5.300.0020.03515.74
5.5.290.0030.02316.08
5.5.280.0050.02315.94
5.5.270.0050.02716.19
5.5.260.0070.02516.08
5.5.250.0020.02315.65
5.5.240.0060.01715.60
5.5.230.0050.02215.38
5.5.220.0050.02015.43
5.5.210.0030.02415.60
5.5.200.0030.02215.61
5.5.190.0050.02415.59
5.5.180.0020.03715.66
5.5.170.0050.00511.09
5.5.160.0040.02715.77
5.5.150.0030.04315.46
5.5.140.0050.04615.60
5.5.130.0030.04315.75
5.5.120.0100.03715.74
5.5.110.0050.04015.45
5.5.100.0040.02415.71
5.5.90.0020.03615.63
5.5.80.0030.04515.60
5.5.70.0050.03615.62
5.5.60.0020.03315.43
5.5.50.0080.03515.37
5.5.40.0100.02215.70
5.5.30.0030.04315.49
5.5.20.0030.04215.62
5.5.10.0090.03815.57
5.5.00.0070.03615.46
5.4.450.0030.02015.24
5.4.440.0090.01515.30
5.4.430.0020.02615.09
5.4.420.0000.03315.25
5.4.410.0050.01715.21
5.4.400.0030.02014.96
5.4.390.0100.02115.01
5.4.380.0050.02315.04
5.4.370.0030.02314.92
5.4.360.0070.02314.88
5.4.350.0020.02314.91
5.4.340.0060.02015.04
5.4.330.0060.00310.86
5.4.320.0030.03815.00
5.4.310.0020.04114.92
5.4.300.0060.03115.11
5.4.290.0080.04015.01
5.4.280.0080.03615.03
5.4.270.0030.04314.98
5.4.260.0110.03715.09
5.4.250.0070.04014.89
5.4.240.0080.03814.96
5.4.230.0030.03714.92
5.4.220.0070.02715.12
5.4.210.0030.02314.74
5.4.200.0070.02415.03
5.4.190.0050.04314.95
5.4.180.0050.04215.10
5.4.170.0030.02514.99
5.4.160.0040.03914.86
5.4.150.0040.04214.76
5.4.140.0060.01713.60
5.4.130.0020.03513.40
5.4.120.0070.02713.59
5.4.110.0000.03813.60
5.4.100.0040.04013.73
5.4.90.0070.03013.56
5.4.80.0070.03713.71
5.4.70.0000.04313.79
5.4.60.0000.04413.72
5.4.50.0050.03613.71
5.4.40.0070.03713.78
5.4.30.0060.03313.79
5.4.20.0040.02713.67
5.4.10.0050.02413.57
5.4.00.0030.04313.34
5.3.290.0040.03412.72
5.3.280.0050.03812.57
5.3.270.0080.03512.64
5.3.260.0020.03312.62
5.3.250.0100.03812.62
5.3.240.0070.04112.47
5.3.230.0070.03412.49
5.3.220.0030.04112.46
5.3.210.0020.04312.51
5.3.200.0100.03712.44
5.3.190.0030.02412.54
5.3.180.0040.02512.51
5.3.170.0040.02312.60
5.3.160.0070.03712.63
5.3.150.0050.02512.56
5.3.140.0070.02212.62
5.3.130.0120.03612.61
5.3.120.0030.04312.46
5.3.110.0090.03812.61
5.3.100.0030.04312.31
5.3.90.0030.04112.30
5.3.80.0070.04012.18
5.3.70.0030.04112.25
5.3.60.0030.02512.28
5.3.50.0090.03412.21
5.3.40.0030.02612.26
5.3.30.0020.04512.09
5.3.20.0080.02312.04
5.3.10.0090.03511.79
5.3.00.0050.04011.97
5.2.170.0030.01910.38
5.2.160.0070.03210.28
5.2.150.0050.03210.42
5.2.140.0030.03510.22
5.2.130.0030.02510.28
5.2.120.0020.02110.34
5.2.110.0050.03210.25
5.2.100.0070.03310.32
5.2.90.0080.02810.31
5.2.80.0030.02510.29
5.2.70.0000.02110.26
5.2.60.0050.02610.25
5.2.50.0040.03010.26
5.2.40.0080.03210.33
5.2.30.0030.02210.21
5.2.20.0040.02810.17
5.2.10.0080.03010.06
5.2.00.0070.0309.99
5.1.60.0040.0289.28
5.1.50.0030.0309.31
5.1.40.0090.0249.34
5.1.30.0050.0179.55
5.1.20.0050.0299.50
5.1.10.0070.0269.37
5.1.00.0030.0199.28
5.0.50.0020.0278.56
5.0.40.0010.0168.36
5.0.30.0060.0138.38
5.0.20.0000.0238.37
5.0.10.0030.0158.35
5.0.00.0020.0228.35
4.4.90.0050.0128.35
4.4.80.0030.0188.35
4.4.70.0000.0148.35
4.4.60.0010.0168.35
4.4.50.0020.0148.35
4.4.40.0010.0288.35
4.4.30.0030.0108.35
4.4.20.0030.0108.35
4.4.10.0050.0178.35
4.4.00.0020.0288.35
4.3.110.0020.0208.35
4.3.100.0000.0218.35
4.3.90.0000.0158.35
4.3.80.0030.0278.35
4.3.70.0000.0148.35
4.3.60.0030.0178.35
4.3.50.0020.0118.35
4.3.40.0050.0248.35
4.3.30.0040.0208.35
4.3.20.0000.0248.35
4.3.10.0040.0128.35
4.3.00.0000.0178.35

preferences:
52.81 ms | 401 KiB | 5 Q