3v4l.org

run code in 300+ PHP versions simultaneously
<?php function declareClassAndGetName() { $foo = new class { public function hello() { echo 'Hello', PHP_EOL; } }; return get_class(new $foo); } $className = declareClassAndGetName(); $foo = new $className; $foo->hello();

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.5.00.0190.00719.93
8.4.150.0030.00014.05
8.4.140.0140.01317.24
8.4.130.0130.00818.86
8.4.120.0120.00824.18
8.4.110.0040.00518.92
8.4.100.0080.00818.80
8.4.90.0080.01120.71
8.4.80.0120.00720.59
8.4.70.0050.01118.15
8.4.60.0090.01118.96
8.4.50.0090.01018.70
8.4.40.0130.00319.31
8.4.30.0080.01219.57
8.4.20.0130.00717.70
8.4.10.0040.00417.77
8.3.280.0100.00918.24
8.3.270.0130.00616.38
8.3.260.0070.00216.64
8.3.250.0100.00918.95
8.3.240.0120.00817.22
8.3.230.0110.00816.27
8.3.220.0110.00719.11
8.3.210.0090.01016.79
8.3.200.0040.00516.77
8.3.190.0110.00818.93
8.3.180.0110.00716.97
8.3.170.0120.00618.96
8.3.160.0130.00718.53
8.3.150.0120.00617.13
8.3.140.0040.00417.29
8.3.130.0040.00418.28
8.3.120.0080.00018.98
8.3.110.0060.00320.94
8.3.100.0090.00616.49
8.3.90.0030.00518.28
8.3.80.0060.00618.27
8.3.70.0040.01116.63
8.3.60.0140.00718.35
8.3.50.0120.00718.91
8.3.40.0200.00518.86
8.3.30.0200.00818.88
8.3.20.0170.00619.45
8.3.10.0140.00519.63
8.3.00.0140.00818.39
8.2.290.0040.00420.25
8.2.280.0080.01118.30
8.2.270.0040.00817.25
8.2.260.0090.00918.79
8.2.250.0090.00617.36
8.2.240.0080.00017.06
8.2.230.0060.00322.58
8.2.220.0090.00024.06
8.2.210.0080.00026.77
8.2.200.0040.00416.50
8.2.190.0070.00716.75
8.2.180.0040.01318.16
8.2.170.0240.00420.11
8.2.160.0200.00819.07
8.2.150.0250.00420.71
8.2.140.0240.00621.02
8.2.130.0190.00618.44
8.2.120.0220.01021.79
8.2.110.0240.00718.45
8.2.100.0190.00517.70
8.2.90.0170.00817.50
8.2.80.0200.01017.94
8.2.70.0220.00817.50
8.2.60.0070.00718.49
8.2.50.0200.00717.71
8.2.40.0200.00318.29
8.2.30.0120.01118.28
8.2.20.0080.01018.52
8.2.10.0130.01017.67
8.2.00.0180.00417.65
8.1.330.0090.00921.91
8.1.320.0050.00916.37
8.1.310.0000.00716.49
8.1.300.0050.00317.96
8.1.290.0060.00318.88
8.1.280.0090.00916.11
8.1.270.0100.00620.54
8.1.260.0160.00621.79
8.1.250.0120.00922.66
8.1.240.0120.00819.06
8.1.230.0130.00819.10
8.1.220.0160.00517.79
8.1.210.0140.00518.08
8.1.200.0140.00717.18
8.1.190.0130.00617.05
8.1.180.0150.00418.37
8.1.170.0160.00317.37
8.1.160.0130.00717.93
8.1.150.0150.00418.72
8.1.140.0130.00618.23
8.1.130.0110.00718.91
8.1.120.0140.00317.29
8.1.110.0130.00717.31
8.1.100.0170.00318.24
8.1.90.0130.00917.31
8.1.80.0150.00417.16
8.1.70.0130.00917.28
8.1.60.0140.00917.40
8.1.50.0210.00217.29
8.1.40.0150.00717.40
8.1.30.0180.00417.46
8.1.20.0180.00417.40
8.1.10.0150.00817.45
8.1.00.0160.00617.25
8.0.300.0140.00518.26
8.0.290.0160.00416.50
8.0.280.0170.00217.45
8.0.270.0140.00517.44
8.0.260.0110.00716.73
8.0.250.0110.00816.71
8.0.240.0170.00316.68
8.0.230.0160.00316.67
8.0.220.0120.00716.64
8.0.210.0150.00516.52
8.0.200.0130.00516.61
8.0.190.0180.00116.61
8.0.180.0220.00316.72
8.0.170.0140.00616.79
8.0.160.0140.00717.13
8.0.150.0140.00716.70
8.0.140.0170.00516.59
8.0.130.0190.00116.20
8.0.120.0140.00516.68
8.0.110.0140.00717.09
8.0.100.0160.00416.61
8.0.90.0170.00516.68
8.0.80.0150.00716.71
8.0.70.0120.00616.67
8.0.60.0130.00416.65
8.0.50.0140.00316.62
8.0.30.0130.00716.94
8.0.20.0170.00517.02
8.0.10.0150.00516.83
8.0.00.0070.01017.27
7.4.330.0090.00716.56
7.4.320.0150.00316.46
7.4.300.0110.00716.25
7.4.290.0110.00616.17
7.4.280.0180.00316.46
7.4.270.0170.00316.40
7.4.260.0180.00416.33
7.4.250.0150.00416.38
7.4.240.0140.00616.38
7.4.230.0150.00716.34
7.4.220.0080.00816.31
7.4.210.0090.00716.48
7.4.200.0100.00316.41
7.4.190.0110.00716.39
7.4.180.0180.00516.42
7.4.160.0150.00716.74
7.4.150.0150.00516.23
7.4.140.0110.00817.18
7.4.130.0140.00416.25
7.4.120.0060.01116.39
7.4.110.0110.00616.25
7.4.100.0090.00916.83
7.4.90.0130.00616.36
7.4.80.0140.00617.09
7.4.70.0150.00516.39
7.4.60.0130.00616.34
7.4.50.0140.00516.19
7.4.40.0170.00316.29
7.4.30.0180.00416.34
7.4.20.0110.00816.22
7.4.10.0110.00716.29
7.4.00.0090.00816.04
7.3.330.0120.00515.47
7.3.320.0130.00515.91
7.3.310.0150.00516.18
7.3.300.0140.00716.68
7.3.290.0140.00516.14
7.3.280.0150.00616.25
7.3.270.0200.00416.09
7.3.260.0150.00616.37
7.3.250.0180.00616.19
7.3.240.0130.00816.30
7.3.230.0160.00416.17
7.3.220.0180.00515.88
7.3.210.0160.00616.67
7.3.200.0140.00816.15
7.3.190.0130.00816.07
7.3.180.0210.00216.15
7.3.170.0170.00516.18
7.3.160.0140.00916.06
7.3.150.0200.00216.13
7.3.140.0150.00915.97
7.3.130.0170.00616.03
7.3.120.0150.00716.08
7.3.110.0140.00815.95
7.3.100.0180.00616.07
7.3.90.0200.00316.43
7.3.80.0210.00416.11
7.3.70.0170.00716.26
7.3.60.0220.00316.19
7.3.50.0220.00416.39
7.3.40.0160.00716.26
7.3.30.0160.00816.33
7.3.20.0170.00617.85
7.3.10.0140.00617.47
7.3.00.0160.00417.73
7.2.340.0150.01016.02
7.2.330.0170.00616.30
7.2.320.0160.00816.31
7.2.310.0170.00616.29
7.2.300.0150.00916.22
7.2.290.0170.00716.33
7.2.280.0110.01216.01
7.2.270.0180.00516.11
7.2.260.0170.00616.08
7.2.250.0180.00616.15
7.2.240.0180.00716.16
7.2.230.0180.00616.06
7.2.220.0170.00716.17
7.2.210.0190.00416.22
7.2.200.0180.00616.22
7.2.190.0170.00616.24
7.2.180.0190.00316.13
7.2.170.0190.00416.32
7.2.160.0150.00616.98
7.2.150.0190.00318.17
7.2.140.0180.00418.28
7.2.130.0150.00717.65
7.2.120.0130.00518.04
7.2.110.0130.00817.72
7.2.100.0180.00517.79
7.2.90.0180.00417.82
7.2.80.0170.00617.85
7.2.70.0150.00717.86
7.2.60.0120.00617.58
7.2.50.0140.00717.65
7.2.40.0190.00718.00
7.2.30.0210.00717.77
7.2.20.0200.00817.83
7.2.10.0180.00517.96
7.2.00.0230.00617.86
7.1.330.0180.00317.22
7.1.320.0160.00517.16
7.1.310.0160.00517.21
7.1.300.0130.00817.09
7.1.290.0160.00517.13
7.1.280.0140.00717.18
7.1.270.0130.00817.20
7.1.260.0160.00517.08
7.1.250.0170.00316.59
7.1.240.0140.00617.04
7.1.230.0150.00517.06
7.1.220.0140.00716.98
7.1.210.0180.00316.96
7.1.200.0140.00416.79
7.1.190.0170.00417.14
7.1.180.0160.00417.05
7.1.170.0180.00417.06
7.1.160.0230.00517.08
7.1.150.0230.00616.94
7.1.140.0260.00316.98
7.1.130.0240.00617.12
7.1.120.0210.00916.97
7.1.110.0270.00516.89
7.1.100.0260.00516.82
7.1.90.0240.00816.82
7.1.80.0280.00616.91
7.1.70.0270.00516.44
7.1.60.0360.00521.11
7.1.50.0330.00621.11
7.1.40.0510.00820.91
7.1.30.0340.00720.94
7.1.20.0350.00620.97
7.1.10.0290.00716.44
7.1.00.0290.00416.49
7.0.330.0160.00416.66
7.0.320.0150.00516.78
7.0.310.0180.00116.57
7.0.300.0170.00416.67
7.0.290.0160.00416.67
7.0.280.0190.00016.70
7.0.270.0150.00416.78
7.0.260.0140.00616.79
7.0.250.0160.00516.74
7.0.240.0140.00616.90
7.0.230.0120.00816.85
7.0.220.0140.00516.73
7.0.210.0190.00416.94
7.0.200.0150.00516.80
7.0.190.0150.00516.88
7.0.180.0150.00616.68
7.0.170.0130.00616.91
7.0.160.0140.00616.76
7.0.150.0110.01016.77
7.0.140.0160.00616.78
7.0.130.0190.00116.84
7.0.120.0170.00416.81
7.0.110.0200.00216.71
7.0.100.0170.00316.85
7.0.90.0160.00416.79
7.0.80.0140.00616.70
7.0.70.0150.00616.82
7.0.60.0140.00616.83
7.0.50.0170.00216.79
7.0.40.0160.00516.84
7.0.30.0160.00516.78
7.0.20.0160.00416.75
7.0.10.0170.00316.78
7.0.00.0150.00516.82
5.6.400.0160.00515.45
5.6.390.0150.00415.43
5.6.380.0110.00815.49
5.6.370.0150.00415.31
5.6.360.0140.00615.30
5.6.350.0170.00215.52
5.6.340.0180.00215.39
5.6.330.0140.00515.44
5.6.320.0150.00515.34
5.6.310.0180.00215.37
5.6.300.0130.00615.34
5.6.290.0160.00415.41
5.6.280.0150.00215.50
5.6.270.0150.00415.47
5.6.260.0170.00215.56
5.6.250.0140.00615.37
5.6.240.0160.00415.43
5.6.230.0150.00415.42
5.6.220.0160.00415.48
5.6.210.0180.00215.41
5.6.200.0140.00515.60
5.6.190.0140.00615.52
5.6.180.0150.00415.47
5.6.170.0140.00615.57
5.6.160.0140.00615.60
5.6.150.0170.00215.63
5.6.140.0180.00315.39
5.6.130.0170.00415.43
5.6.120.0120.00815.54
5.6.110.0150.00515.36
5.6.100.0150.00515.53
5.6.90.0140.00615.50
5.6.80.0150.00515.36
5.6.70.0120.00715.45
5.6.60.0150.00515.53
5.6.50.0120.00615.39
5.6.40.0110.00715.45
5.6.30.0150.00415.40
5.6.20.0170.00315.27
5.6.10.0150.00415.46
5.6.00.0190.00115.33
5.5.380.0250.00315.38
5.5.370.0210.00915.13
5.5.360.0210.00715.25
5.5.350.0190.00915.13
5.5.340.0200.00715.13
5.5.330.0310.00015.00
5.5.320.0210.00715.25
5.5.310.0190.00715.13
5.5.300.0240.00315.25
5.5.290.0170.00715.00
5.5.280.0220.00415.38
5.5.270.0140.01115.13
5.5.260.0160.00815.25
5.5.250.0180.00615.38
5.5.240.0200.00314.88
5.5.230.0180.00615.38
5.5.220.0180.00715.38
5.5.210.0210.00415.13
5.5.200.0150.00815.13
5.5.190.0130.01015.13
5.5.180.0190.01015.00
5.5.170.0130.01015.13
5.5.160.0200.00215.25
5.5.150.0190.00515.13
5.5.140.0230.00014.88
5.5.130.0250.00014.88
5.5.120.0150.00915.00
5.5.110.0190.00615.13
5.5.100.0160.00615.38
5.5.90.0190.00315.38
5.5.80.0170.00715.25
5.5.70.0190.00315.13
5.5.60.0210.00315.50
5.5.50.0120.01215.13
5.5.40.0210.00315.25
5.5.30.0160.00615.38
5.5.20.0130.01315.50
5.5.10.0120.01215.25
5.5.00.0210.00415.25
5.4.450.0140.00612.38
5.4.440.0120.00912.38
5.4.430.0200.00312.31
5.4.420.0160.00512.50
5.4.410.0190.00012.31
5.4.400.0130.00612.31
5.4.390.0130.00612.31
5.4.380.0130.00712.31
5.4.370.0180.00012.38
5.4.360.0180.00012.31
5.4.350.0150.00412.38
5.4.340.0150.00312.31
5.4.330.0110.00712.31
5.4.320.0150.00312.31
5.4.310.0130.00612.31
5.4.300.0180.00612.38
5.4.290.0190.00312.31
5.4.280.0140.00412.31
5.4.270.0170.00312.31
5.4.260.0130.00712.31
5.4.250.0160.00312.31
5.4.240.0140.00412.31
5.4.230.0070.01112.31
5.4.220.0130.00512.31
5.4.210.0130.00712.31
5.4.200.0190.00012.31
5.4.190.0190.00012.31
5.4.180.0190.00012.31
5.4.170.0150.00412.31
5.4.160.0160.00312.31
5.4.150.0180.00012.31
5.4.140.0150.00412.31
5.4.130.0160.00412.31
5.4.120.0060.01212.31
5.4.110.0150.00412.31
5.4.100.0180.00312.31
5.4.90.0140.00712.31
5.4.80.0150.00412.31
5.4.70.0180.00012.31
5.4.60.0150.00912.50
5.4.50.0150.00312.31
5.4.40.0070.01012.31
5.4.30.0130.00712.31
5.4.20.0160.00412.31
5.4.10.0100.00712.50
5.4.00.0170.00012.38
5.3.290.0110.00712.63
5.3.280.0170.00312.63
5.3.270.0190.00012.50
5.3.260.0110.00712.50
5.3.250.0140.00412.50
5.3.240.0180.00012.38
5.3.230.0190.00012.31
5.3.220.0130.00612.38
5.3.210.0150.00312.38
5.3.200.0090.00912.63
5.3.190.0140.00712.50
5.3.180.0190.00312.50
5.3.170.0130.00612.50
5.3.160.0100.01012.50
5.3.150.0160.00312.75
5.3.140.0180.00012.38
5.3.130.0160.00312.63
5.3.120.0170.00312.38
5.3.110.0150.00312.63
5.3.100.0150.00312.50
5.3.90.0170.00012.75
5.3.80.0150.00412.63
5.3.70.0180.00312.38
5.3.60.0170.00012.63
5.3.50.0130.00412.31
5.3.40.0090.00912.38
5.3.30.0070.01112.31
5.3.20.0200.00012.38
5.3.10.0080.00812.31
5.3.00.0110.00612.31
5.2.170.0100.00312.31
5.2.160.0110.00312.31
5.2.150.0120.00312.31
5.2.140.0110.00312.31
5.2.130.0050.00912.31
5.2.120.0130.00312.31
5.2.110.0120.00312.31
5.2.100.0040.01212.31
5.2.90.0100.00612.31
5.2.80.0100.00512.31
5.2.70.0050.01012.31
5.2.60.0110.00412.31
5.2.50.0110.00412.31
5.2.40.0130.00312.31
5.2.30.0130.00312.31
5.2.20.0120.00412.31
5.2.10.0140.00012.31
5.2.00.0030.01012.31
5.1.60.0100.00312.31
5.1.50.0110.00312.31
5.1.40.0040.00812.31
5.1.30.0120.00012.31
5.1.20.0120.00012.31
5.1.10.0100.00312.31
5.1.00.0030.00612.31
5.0.50.0040.00412.31
5.0.40.0060.00312.31
5.0.30.0060.00312.31
5.0.20.0000.00712.31
5.0.10.0070.00012.31
5.0.00.0000.00812.31
4.4.90.0040.00012.31
4.4.80.0040.00012.31
4.4.70.0040.00012.31
4.4.60.0040.00012.31
4.4.50.0000.00312.31
4.4.40.0040.00012.31
4.4.30.0020.00212.31
4.4.20.0030.00012.31
4.4.10.0040.00012.31
4.4.00.0040.00012.31
4.3.110.0030.00012.31
4.3.100.0040.00012.31
4.3.90.0040.00012.31
4.3.80.0000.00312.31
4.3.70.0000.00412.31
4.3.60.0040.00012.31
4.3.50.0040.00012.31
4.3.40.0040.00012.31
4.3.30.0030.00012.31
4.3.20.0030.00012.31
4.3.10.0020.00212.31
4.3.00.0030.00012.31

preferences:
191.38 ms | 403 KiB | 5 Q