3v4l.org

run code in 300+ PHP versions simultaneously
<?php /*Variables: (1)Php has 8 types of variables which include: - Boolean (true/false) - integers - floating integers - strings - arrays - objects - resources - null (2)variables must start with $ sign (3)Variable names can contain a combination of strings, numbers and underscores (4)The first character in the name of a variable must be either a letter or underscore (5)Php variable names are case sensitive (6)Variables can be assigned with equal signs and printed without quotation marks Eg, print $some_variable; , or echo $some_variable; (7)Variables can also be printed with double quotations but cannot with single quotes*/ echo 'Defining a variable:'; $variable_name = 'this is a string representation of a variable'; echo $variable_name; echo 'this is an integer representation of a variable'; echo $variable_name = 30; ?>

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.0130.00718.17
8.3.50.0090.00821.98
8.3.40.0140.00318.46
8.3.30.0070.00719.05
8.3.20.0000.00820.16
8.3.10.0040.00423.54
8.3.00.0050.00320.96
8.2.180.0120.00918.41
8.2.170.0070.01322.96
8.2.160.0130.00020.43
8.2.150.0000.00724.18
8.2.140.0070.00024.66
8.2.130.0070.00026.16
8.2.120.0040.00419.24
8.2.110.0070.00320.34
8.2.100.0070.00417.91
8.2.90.0030.00619.23
8.2.80.0000.00817.97
8.2.70.0060.00317.63
8.2.60.0050.00517.55
8.2.50.0100.00018.07
8.2.40.0080.00019.96
8.2.30.0040.00418.30
8.2.20.0070.00017.68
8.2.10.0050.00318.20
8.2.00.0080.00017.55
8.1.280.0100.00325.92
8.1.270.0040.00422.05
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0000.00923.98
8.1.230.0040.00817.46
8.1.220.0050.00317.74
8.1.210.0000.00818.77
8.1.200.0090.00017.23
8.1.190.0040.00417.00
8.1.180.0000.00918.10
8.1.170.0090.00018.52
8.1.160.0030.00321.93
8.1.150.0050.00218.53
8.1.140.0000.00717.39
8.1.130.0000.00719.61
8.1.120.0000.00717.32
8.1.110.0080.00017.37
8.1.100.0050.00317.39
8.1.90.0000.00717.40
8.1.80.0030.00317.41
8.1.70.0030.00317.27
8.1.60.0030.00617.58
8.1.50.0000.00817.49
8.1.40.0070.00717.34
8.1.30.0060.00317.56
8.1.20.0050.00317.55
8.1.10.0040.00417.50
8.1.00.0070.00017.50
8.0.300.0070.00018.77
8.0.290.0000.00816.75
8.0.280.0000.00718.34
8.0.270.0070.00017.21
8.0.260.0000.00617.16
8.0.250.0000.00616.83
8.0.240.0040.00416.99
8.0.230.0030.00316.91
8.0.220.0070.00016.80
8.0.210.0000.00616.80
8.0.200.0030.00316.75
8.0.190.0000.00716.82
8.0.180.0040.00416.80
8.0.170.0050.00316.82
8.0.160.0030.00316.73
8.0.150.0030.00316.85
8.0.140.0000.00716.78
8.0.130.0000.00513.19
8.0.120.0050.00316.70
8.0.110.0040.00416.68
8.0.100.0070.00316.71
8.0.90.0030.00316.69
8.0.80.0060.00916.77
8.0.70.0070.00016.79
8.0.60.0030.00316.69
8.0.50.0030.00316.70
8.0.30.0080.01016.81
8.0.20.0090.00917.41
8.0.10.0040.00416.80
8.0.00.0100.00916.62
7.4.330.0000.00615.01
7.4.320.0060.00016.52
7.4.300.0060.00016.45
7.4.290.0090.00316.54
7.4.280.0070.00016.54
7.4.270.0040.00416.53
7.4.260.0040.00216.53
7.4.250.0050.00216.26
7.4.240.0000.00716.44
7.4.230.0000.00616.36
7.4.220.0030.01516.55
7.4.210.0070.00716.56
7.4.200.0030.00416.54
7.4.160.0090.00916.56
7.4.150.0150.00917.40
7.4.140.0110.00617.86
7.4.130.0060.01416.39
7.4.120.0120.00616.51
7.4.110.0160.00416.32
7.4.100.0060.01116.42
7.4.90.0070.01116.43
7.4.80.0140.00419.39
7.4.70.0090.00916.46
7.4.60.0120.00616.55
7.4.50.0000.00916.27
7.4.40.0070.01116.38
7.4.30.0140.00616.43
7.4.00.0100.00714.73
7.3.330.0060.00012.94
7.3.320.0060.00012.93
7.3.310.0070.00016.32
7.3.300.0000.00616.10
7.3.290.0090.00916.23
7.3.280.0110.00516.20
7.3.270.0130.00717.40
7.3.260.0070.01016.27
7.3.250.0080.01016.32
7.3.240.0130.01216.57
7.3.230.0060.00916.42
7.3.210.0070.01116.59
7.3.200.0030.02019.39
7.3.190.0110.01116.27
7.3.180.0060.00916.25
7.3.170.0060.00916.27
7.3.160.0130.00516.14
7.3.120.0080.00814.84
7.2.330.0110.00816.60
7.2.320.0130.01016.56
7.2.310.0120.00416.65
7.2.300.0130.00316.63
7.2.290.0090.01216.49
7.2.00.0070.00419.37
7.1.200.0000.01115.65
7.1.100.0000.01317.62
7.1.70.0030.00617.09
7.1.60.0120.01219.70
7.1.50.0070.01716.82
7.1.00.0030.07722.43
7.0.200.0030.00316.54
7.0.140.0000.08022.18
7.0.70.0030.08021.71
7.0.60.0070.08021.69
7.0.50.0030.08322.09
7.0.40.0030.08720.18
7.0.30.0000.09020.15
7.0.20.0000.04320.11
7.0.10.0030.04320.14
7.0.00.0030.04320.08
5.6.280.0030.07720.86
5.6.220.0070.07720.66
5.6.210.0100.07320.55
5.6.200.0000.09021.11
5.6.190.0030.08321.08
5.6.180.0100.06321.17
5.6.170.0070.05321.10
5.6.160.0000.04320.95
5.6.150.0030.05020.95
5.6.140.0000.04321.00
5.6.130.0070.03721.01
5.6.120.0000.03721.07
5.6.110.0030.04021.06
5.6.100.0030.03721.02
5.6.90.0030.04721.03
5.6.80.0030.08720.39
5.6.70.0000.07020.45
5.6.60.0030.04020.50
5.6.50.0000.03320.45
5.6.40.0000.05320.48
5.6.30.0070.04720.32
5.6.20.0030.04320.39
5.6.10.0070.06320.30
5.6.00.0030.03720.38
5.5.360.0070.09720.43
5.5.350.0030.06720.47
5.5.340.0030.08320.86
5.5.330.0030.08720.82
5.5.320.0100.07020.87
5.5.310.0030.04320.75
5.5.300.0100.03320.92
5.5.290.0070.03720.90
5.5.280.0000.05020.88
5.5.270.0000.04320.81
5.5.260.0070.07720.90
5.5.250.0030.04020.71
5.5.240.0030.05720.25
5.5.230.0030.06020.27
5.5.220.0030.03720.19
5.5.210.0000.04020.18
5.5.200.0030.03720.23
5.5.190.0030.05020.21
5.5.180.0000.05020.25
5.5.160.0070.03320.27
5.5.150.0000.04020.09
5.5.140.0000.04020.11
5.5.130.0030.03720.22
5.5.120.0000.03319.98
5.5.110.0000.03320.17
5.5.100.0000.03320.06
5.5.90.0000.05020.11
5.5.80.0000.04020.14
5.5.70.0000.04020.14
5.5.60.0000.03720.05
5.5.50.0000.03720.08
5.5.40.0070.03320.13
5.5.30.0000.05020.09
5.5.20.0030.06320.04
5.5.10.0070.05020.11
5.5.00.0000.08320.10
5.4.450.0000.04019.41
5.4.440.0030.03319.49
5.4.430.0070.06019.39
5.4.420.0070.04319.44
5.4.410.0070.04019.27
5.4.400.0030.07719.10
5.4.390.0030.03718.90
5.4.380.0000.04019.13
5.4.370.0030.06318.81
5.4.360.0000.04319.12
5.4.350.0000.03318.90
5.4.340.0000.06018.79
5.4.320.0070.03318.81
5.4.310.0030.03718.93
5.4.300.0000.04019.12
5.4.290.0000.03718.96
5.4.280.0000.04018.97
5.4.270.0000.03718.81
5.4.260.0030.03019.09
5.4.250.0070.04019.03
5.4.240.0000.03719.04
5.4.230.0000.03719.04
5.4.220.0030.03019.11
5.4.210.0030.03319.13
5.4.200.0000.06319.11
5.4.190.0000.04019.21
5.4.180.0200.06019.06
5.4.170.0030.04718.80
5.4.160.0100.03718.82
5.4.150.0100.07319.07
5.4.140.0070.07716.28
5.4.130.0070.04716.36
5.4.120.0100.07016.26
5.4.110.0000.04316.33
5.4.100.0000.05316.41
5.4.90.0070.06716.43
5.4.80.0030.05716.31
5.4.70.0030.07316.32
5.4.60.0000.07016.33
5.4.50.0000.06016.35
5.4.40.0030.07316.34
5.4.30.0030.06716.20
5.4.20.0030.07316.25
5.4.10.0000.04716.33
5.4.00.0030.06315.73
5.3.290.0000.04314.51
5.3.280.0000.03714.60
5.3.270.0030.07314.59
5.3.260.0070.07314.59
5.3.250.0000.04014.46
5.3.240.0070.07714.42
5.3.230.0070.07014.54
5.3.220.0000.08014.49
5.3.210.0000.07714.40
5.3.200.0070.06014.52
5.3.190.0100.07314.38
5.3.180.0030.06314.41
5.3.170.0030.07314.57
5.3.160.0100.07014.42
5.3.150.0030.07714.53
5.3.140.0000.08014.45
5.3.130.0030.07714.40
5.3.120.0030.08014.48
5.3.110.0070.06014.53
5.3.100.0000.07714.04
5.3.90.0000.08013.98
5.3.80.0070.07013.86
5.3.70.0000.07313.94
5.3.60.0000.07313.97
5.3.50.0030.07313.93
5.3.40.0000.07313.89
5.3.30.0030.07313.66
5.3.20.0100.06313.64
5.3.10.0070.06713.61
5.3.00.0000.06313.39
5.2.170.0000.06312.23
5.2.160.0000.06712.23
5.2.150.0030.06012.23
5.2.140.0070.04012.23
5.2.130.0070.05312.23
5.2.120.0000.05312.23
5.2.110.0000.06012.23
5.2.100.0000.06312.23
5.2.90.0070.06012.23
5.2.80.0030.06312.23
5.2.70.0030.06012.23
5.2.60.0000.05712.23
5.2.50.0070.06012.23
5.2.40.0030.05012.23
5.2.30.0130.04712.23
5.2.20.0070.05312.23
5.2.10.0000.06312.23
5.2.00.0000.05312.23
5.1.60.0000.05012.23
5.1.50.0100.04712.23
5.1.40.0070.05012.23
5.1.30.0030.04712.23
5.1.20.0000.06012.23
5.1.10.0030.03712.23
5.1.00.0030.05012.23
5.0.50.0000.03012.23
5.0.40.0070.04012.23
5.0.30.0030.03712.23
5.0.20.0000.03712.23
5.0.10.0100.03712.23
5.0.00.0030.06712.23
4.4.90.0030.03712.23
4.4.80.0030.02712.23
4.4.70.0000.03712.23
4.4.60.0000.03712.23
4.4.50.0000.03712.23
4.4.40.0000.03712.23
4.4.30.0030.02312.23
4.4.20.0000.03712.23
4.4.10.0070.03712.23
4.4.00.0000.03712.23
4.3.110.0000.02712.23
4.3.100.0030.01312.23
4.3.90.0030.01712.23
4.3.80.0000.05012.23
4.3.70.0070.01712.23
4.3.60.0000.03312.23
4.3.50.0030.02312.23
4.3.40.0070.04712.23
4.3.30.0000.03712.23
4.3.20.0070.02712.23
4.3.10.0070.03012.23
4.3.00.0000.03712.23

preferences:
51.83 ms | 401 KiB | 5 Q