3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public function m() { static $x; if ($x === null) { $x = get_class($this); } return $x; } } class B extends A { } $a = new A(); $b = new B(); echo $a->m()."\n"; echo $b->m()."\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.130.0030.00518.63
8.3.120.0060.00319.01
8.3.110.0030.00620.94
8.3.100.0090.00016.65
8.3.90.0040.00418.36
8.3.80.0070.00316.75
8.3.70.0110.00316.58
8.3.60.0140.00016.38
8.3.50.0100.00616.45
8.3.40.0070.01418.71
8.3.30.0130.00318.58
8.3.20.0040.00424.18
8.3.10.0000.00824.66
8.3.00.0080.00026.16
8.2.250.0080.00016.44
8.2.240.0000.00817.04
8.2.230.0060.00322.58
8.2.220.0040.00424.06
8.2.210.0000.00826.77
8.2.200.0030.00616.63
8.2.190.0170.00316.58
8.2.180.0100.00725.92
8.2.170.0140.00018.82
8.2.160.0100.00322.96
8.2.150.0070.00025.66
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0030.00526.35
8.2.110.0030.00722.29
8.2.100.0070.00417.91
8.2.90.0000.00920.58
8.2.80.0000.00817.97
8.2.70.0050.00317.63
8.2.60.0000.00817.93
8.2.50.0030.00618.07
8.2.40.0040.00418.16
8.2.30.0040.00418.09
8.2.20.0070.00018.00
8.2.10.0020.00519.25
8.2.00.0080.00019.23
8.1.300.0100.00017.72
8.1.290.0000.01118.88
8.1.280.0150.00025.92
8.1.270.0050.00223.99
8.1.260.0040.00428.09
8.1.250.0040.00428.09
8.1.240.0060.00322.53
8.1.230.0110.00021.04
8.1.220.0040.00417.74
8.1.210.0000.00718.96
8.1.200.0060.00317.35
8.1.190.0000.00817.25
8.1.180.0040.00418.10
8.1.170.0050.00318.50
8.1.160.0000.00718.88
8.1.150.0020.00518.82
8.1.140.0080.00018.84
8.1.130.0060.00320.15
8.1.120.0000.00717.46
8.1.110.0050.00217.29
8.1.100.0000.00717.41
8.1.90.0050.00217.44
8.1.80.0000.01117.39
8.1.70.0030.00317.47
8.1.60.0070.00017.55
8.1.50.0090.00017.35
8.1.40.0000.00917.41
8.1.30.0070.00017.59
8.1.20.0040.00417.61
8.1.10.0060.00317.53
8.1.00.0050.00317.52
8.0.300.0000.00719.86
8.0.290.0000.00916.75
8.0.280.0000.01018.38
8.0.270.0030.00517.94
8.0.260.0040.00418.45
8.0.250.0000.00816.82
8.0.240.0030.00316.96
8.0.230.0070.00016.86
8.0.220.0000.00716.80
8.0.210.0030.00316.76
8.0.200.0030.00316.95
8.0.190.0090.00016.97
8.0.180.0040.00416.97
8.0.170.0040.00416.95
8.0.160.0040.00416.82
8.0.150.0040.00416.84
8.0.140.0000.00916.88
8.0.130.0060.00013.29
8.0.120.0030.00616.84
8.0.110.0030.00316.73
8.0.100.0050.00317.00
8.0.90.0000.00716.93
8.0.80.0100.00616.90
8.0.70.0050.00316.77
8.0.60.0000.00816.95
8.0.50.0040.00416.84
8.0.30.0080.00616.84
8.0.20.0060.00816.93
8.0.10.0050.01016.96
8.0.00.0060.00817.07
7.4.330.0020.00215.55
7.4.320.0000.00616.46
7.4.300.0060.00016.61
7.4.290.0000.01016.39
7.4.280.0040.00416.62
7.4.270.0070.00016.58
7.4.260.0050.00013.21
7.4.250.0030.00316.38
7.4.240.0070.00016.52
7.4.230.0040.00416.60
7.4.220.0030.00316.54
7.4.210.0100.00516.54
7.4.200.0030.00316.69
7.4.160.0060.00816.60
7.4.150.0080.00616.51
7.4.140.0100.00516.32
7.4.130.0040.00916.45
7.4.120.0070.00716.51
7.4.110.0060.00716.38
7.4.100.0070.00616.56
7.4.90.0080.00816.51
7.4.80.0030.01016.44
7.4.70.0050.00916.49
7.4.60.0080.00816.49
7.4.50.0070.00816.45
7.4.40.0050.01016.43
7.4.30.0050.01016.40
7.4.20.0080.00616.43
7.4.10.0100.00516.56
7.4.00.0030.01116.57
7.3.330.0030.00616.46
7.3.320.0030.00313.23
7.3.310.0070.00016.26
7.3.300.0070.00016.24
7.3.290.0090.00716.37
7.3.270.0070.00616.38
7.3.260.0100.00316.35
7.3.250.0030.01016.37
7.3.240.0100.00316.33
7.3.230.0130.00016.31
7.3.220.0100.00316.27
7.3.210.0050.00816.35
7.3.200.0120.00316.25
7.3.190.0080.00516.31
7.3.180.0060.01016.34
7.3.170.0030.01016.37
7.3.160.0090.00616.29
7.3.150.0060.00716.32
7.3.140.0080.00616.31
7.3.130.0120.00316.25
7.3.120.0050.00716.28
7.3.110.0060.00816.20
7.3.100.0060.00916.22
7.3.90.0040.00916.55
7.3.80.0020.01116.28
7.3.70.0060.00816.36
7.3.60.0000.01616.37
7.3.50.0080.00816.40
7.3.40.0070.00916.41
7.3.30.0100.00316.41
7.3.20.0100.00418.23
7.3.10.0030.01118.21
7.3.00.0090.00618.29
7.2.340.0140.01016.35
7.2.330.0180.00716.27
7.2.320.0100.01316.37
7.2.310.0240.00316.35
7.2.300.0120.01716.35
7.2.290.0190.00516.38
7.2.280.0160.01116.25
7.2.270.0210.00816.32
7.2.260.0230.00016.39
7.2.250.0160.01016.32
7.2.240.0140.01416.37
7.2.230.0170.00816.35
7.2.220.0160.00816.42
7.2.210.0120.01216.32
7.2.200.0280.00316.52
7.2.190.0220.00416.41
7.2.180.0110.01716.39
7.2.170.0110.01416.56
7.2.160.0190.00416.52
7.2.150.0240.00018.42
7.2.140.0270.00018.48
7.2.130.0180.00918.57
7.2.120.0130.01318.45
7.2.110.0150.01118.48
7.2.100.0160.00818.59
7.2.90.0180.00818.46
7.2.80.0210.00318.48
7.2.70.0120.01218.44
7.2.60.0180.00518.40
7.2.50.0100.01318.40
7.2.40.0190.00618.46
7.2.30.0150.00918.46
7.2.20.0180.01218.45
7.2.10.0180.00618.47
7.2.00.0040.02118.41
7.1.330.0180.00917.45
7.1.320.0190.00417.39
7.1.310.0140.00917.37
7.1.300.0150.00817.40
7.1.290.0160.01217.38
7.1.280.0190.00817.41
7.1.270.0110.01117.42
7.1.260.0160.00517.42
7.1.250.0150.01317.27
7.1.240.0180.00617.36
7.1.230.0150.00717.37
7.1.220.0160.00617.38
7.1.210.0190.00317.37
7.1.200.0130.01017.42
7.1.190.0150.00717.39
7.1.180.0190.00417.38
7.1.170.0100.01317.21
7.1.160.0200.00317.32
7.1.150.0080.01317.38
7.1.140.0190.00517.24
7.1.130.0160.00617.21
7.1.120.0120.01217.39
7.1.110.0100.01017.34
7.1.100.0190.00417.33
7.1.90.0180.01017.34
7.1.80.0220.00017.38
7.1.70.0140.00917.12
7.1.60.0160.01017.41
7.1.50.0190.00317.35
7.1.40.0120.01217.37
7.1.30.0200.00617.46
7.1.20.0170.00617.47
7.1.10.0180.00417.39
7.1.00.0130.00817.34
7.0.330.0170.00617.01
7.0.320.0120.00917.09
7.0.310.0210.00017.06
7.0.300.0100.01016.91
7.0.290.0120.00916.86
7.0.280.0170.00717.09
7.0.270.0170.00316.94
7.0.260.0170.00517.01
7.0.250.0170.00717.23
7.0.240.0160.00817.07
7.0.230.0140.01017.07
7.0.220.0140.00716.99
7.0.210.0220.00517.06
7.0.200.0110.01116.98
7.0.190.0100.01117.07
7.0.180.0170.01017.03
7.0.170.0140.01417.14
7.0.160.0140.00717.05
7.0.150.0120.00916.89
7.0.140.0180.00416.97
7.0.130.0120.00917.08
7.0.120.0160.00617.04
7.0.110.0200.00017.02
7.0.100.0200.00817.02
7.0.90.0130.01016.94
7.0.80.0130.01316.86
7.0.70.0220.00316.93
7.0.60.0190.00316.91
7.0.50.0140.00716.93
7.0.40.0180.00516.98
7.0.30.0120.01217.01
7.0.20.0090.01217.05
7.0.10.0160.00517.04
7.0.00.0180.00316.92
5.6.400.0180.00415.75
5.6.390.0160.00615.88
5.6.380.0150.00815.77
5.6.370.0150.00915.80
5.6.360.0210.00415.68
5.6.350.0140.00715.83
5.6.340.0110.01515.79
5.6.330.0170.00615.98
5.6.320.0150.00815.82
5.6.310.0150.01515.96
5.6.300.0150.00815.68
5.6.290.0120.00915.77
5.6.280.0130.01015.70
5.6.270.0160.00615.84
5.6.260.0130.00915.86
5.6.250.0240.00315.89
5.6.240.0200.00415.85
5.6.230.0130.00915.99
5.6.220.0120.01616.00
5.6.210.0110.01515.89
5.6.200.0180.00515.93
5.6.190.0280.01416.05
5.6.180.0110.01715.94
5.6.170.0240.00316.02
5.6.160.0120.01215.90
5.6.150.0160.00916.00
5.6.140.0250.00015.97
5.6.130.0090.01315.98
5.6.120.0150.00915.93
5.6.110.0110.01215.76
5.6.100.0220.00016.05
5.6.90.0110.01115.95
5.6.80.0140.00715.77
5.6.70.0080.01216.12
5.6.60.0100.01315.96
5.6.50.0070.01415.86
5.6.40.0170.00415.80
5.6.30.0090.01215.92
5.6.20.0240.00315.84
5.6.10.0140.00715.76
5.6.00.0110.01115.86
5.5.380.0130.01715.93
5.5.370.0110.01215.89
5.5.360.0190.00615.74
5.5.350.0160.00615.76
5.5.340.0100.01315.74
5.5.330.0150.01315.69
5.5.320.0080.02315.77
5.5.310.0220.00215.72
5.5.300.0030.01815.75
5.5.290.0210.00315.93
5.5.280.0140.01415.72
5.5.270.0160.00515.72
5.5.260.0110.01415.89
5.5.250.0090.01215.85
5.5.240.0080.01215.89
5.5.230.0210.00015.84
5.5.220.0090.01215.74
5.5.210.0120.00915.90
5.5.200.0110.01115.66
5.5.190.0130.00915.86
5.5.180.0110.01215.75
5.5.170.0150.00615.63
5.5.160.0200.00615.63
5.5.150.0240.00015.70
5.5.140.0180.00315.60
5.5.130.0110.01015.64
5.5.120.0090.01315.57
5.5.110.0120.00915.60
5.5.100.0070.01415.82
5.5.90.0050.01615.88
5.5.80.0070.01415.79
5.5.70.0190.00415.88
5.5.60.0200.00815.73
5.5.50.0190.00515.71
5.5.40.0130.01015.85
5.5.30.0130.00815.80
5.5.20.0120.01215.89
5.5.10.0190.00615.71
5.5.00.0220.00015.75
5.4.450.0110.00712.71
5.4.440.0130.00912.75
5.4.430.0150.00312.77
5.4.420.0110.00612.70
5.4.410.0060.00912.75
5.4.400.0110.00612.70
5.4.390.0100.00712.72
5.4.380.0130.00312.75
5.4.370.0050.01112.69
5.4.360.0110.00512.68
5.4.350.0170.00312.71
5.4.340.0080.01112.66
5.4.330.0150.00312.64
5.4.320.0140.00412.78
5.4.310.0070.01112.77
5.4.300.0140.00312.79
5.4.290.0130.00612.72
5.4.280.0150.00312.74
5.4.270.0130.00412.73
5.4.260.0100.00812.71
5.4.250.0080.00812.73
5.4.240.0160.00312.71
5.4.230.0080.01212.52
5.4.220.0050.01412.43
5.4.210.0170.00412.56
5.4.200.0040.01212.55
5.4.190.0100.00612.52
5.4.180.0110.00712.64
5.4.170.0090.00912.59
5.4.160.0100.00512.59
5.4.150.0120.00412.52
5.4.140.0050.01412.70
5.4.130.0130.00512.63
5.4.120.0080.00812.71
5.4.110.0150.00612.65
5.4.100.0070.01012.67
5.4.90.0120.00412.71
5.4.80.0080.00812.76
5.4.70.0110.00812.68
5.4.60.0100.00712.69
5.4.50.0140.00612.67
5.4.40.0140.00312.66
5.4.30.0140.00312.71
5.4.20.0110.00612.76
5.4.10.0080.00912.71
5.4.00.0160.00412.62
5.3.290.0120.00813.09
5.3.280.0090.00912.99
5.3.270.0090.00913.32
5.3.260.0040.01313.09
5.3.250.0150.00313.07
5.3.240.0080.00912.94
5.3.230.0130.00312.96
5.3.220.0100.00712.98
5.3.210.0090.01212.79
5.3.200.0090.00912.83
5.3.190.0080.00813.03
5.3.180.0100.00713.07
5.3.170.0100.01013.17
5.3.160.0130.00413.15
5.3.150.0170.00413.04
5.3.140.0070.01413.13
5.3.130.0100.01312.95
5.3.120.0060.01213.02
5.3.110.0170.00312.97
5.3.100.0070.01013.25
5.3.90.0130.00913.13
5.3.80.0120.00613.00
5.3.70.0100.00712.83
5.3.60.0150.00413.01
5.3.50.0130.00912.87
5.3.40.0100.00712.88
5.3.30.0080.01313.14
5.3.20.0080.00813.23
5.3.10.0040.01212.72
5.3.00.0140.00212.73
5.2.170.0120.00212.16
5.2.160.0030.01112.09
5.2.150.0080.00812.32
5.2.140.0130.00311.90
5.2.130.0090.00612.14
5.2.120.0050.00811.89
5.2.110.0090.00612.04
5.2.100.0040.00912.04
5.2.90.0050.00811.84
5.2.80.0070.00711.79
5.2.70.0090.00611.80
5.2.60.0070.00711.68
5.2.50.0090.00612.13
5.2.40.0050.00912.07
5.2.30.0090.00511.82
5.2.20.0130.00011.69
5.2.10.0090.00411.70
5.2.00.0100.00511.54
5.1.60.0080.00810.89
5.1.50.0000.01510.96
5.1.40.0080.00711.22
5.1.30.0060.00711.18
5.1.20.0100.00511.03
5.1.10.0060.00711.11
5.1.00.0060.00610.95
5.0.50.0090.00310.30
5.0.40.0050.0059.82
5.0.30.0040.00710.04
5.0.20.0080.0049.80
5.0.10.0110.00010.02
5.0.00.0100.0009.71
4.4.90.0070.0008.97
4.4.80.0000.0068.97
4.4.70.0000.0068.97
4.4.60.0030.0038.97
4.4.50.0020.0058.97
4.4.40.0040.0048.97
4.4.30.0060.0028.97
4.4.20.0050.0058.97
4.4.10.0040.0028.97
4.4.00.0030.0038.97
4.3.110.0060.0008.97
4.3.100.0040.0028.97
4.3.90.0060.0038.97
4.3.80.0000.0088.97
4.3.70.0000.0078.97
4.3.60.0060.0008.97
4.3.50.0070.0008.97
4.3.40.0070.0008.97
4.3.30.0030.0038.97
4.3.20.0040.0028.97
4.3.10.0030.0038.97
4.3.00.0050.0028.97

preferences:
30.77 ms | 403 KiB | 5 Q