3v4l.org

run code in 300+ PHP versions simultaneously
<?php # read config file data from the file using file_get_contents $string = '{ "mysql": { "host": "locahost", "port": 3306, "database": "test", "username": "root", "password": "" } }'; $cfg = json_decode($string,1); # decode the result as an array $host = $cfg["mysql"]["host"]; $port = $cfg["mysql"]["port"]; $database = $cfg["mysql"]["database"]; $username = $cfg["mysql"]["username"]; $password = $cfg["mysql"]["password"]; echo "host = $host, port = $port, database=$database, username=$username, password=$password"; ?>

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.70.0150.00616.61
8.3.60.0030.01716.48
8.3.50.0130.00318.02
8.3.40.0160.00420.18
8.3.30.0110.01118.63
8.3.20.0070.00021.75
8.3.10.0040.00420.16
8.3.00.0060.00320.66
8.2.190.0170.00316.75
8.2.180.0100.00718.33
8.2.170.0170.00322.96
8.2.160.0030.01019.21
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0070.00020.57
8.2.110.0080.00019.19
8.2.100.0030.00717.91
8.2.90.0050.00317.84
8.2.80.0040.00419.29
8.2.70.0080.00017.38
8.2.60.0040.00817.63
8.2.50.0050.00318.05
8.2.40.0040.00419.95
8.2.30.0040.00418.19
8.2.20.0040.00418.04
8.2.10.0060.00319.30
8.2.00.0000.00819.18
8.1.280.0090.00625.92
8.1.270.0040.00422.19
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0070.00321.99
8.1.230.0040.00820.91
8.1.220.0000.00817.74
8.1.210.0040.00418.97
8.1.200.0040.00417.23
8.1.190.0090.00017.10
8.1.180.0000.00918.10
8.1.170.0000.00817.62
8.1.160.0060.00318.82
8.1.150.0040.00418.74
8.1.140.0000.00718.78
8.1.130.0030.00317.40
8.1.120.0040.00417.47
8.1.110.0040.00417.28
8.1.100.0000.00717.25
8.1.90.0040.00417.29
8.1.80.0040.00417.30
8.1.70.0040.00417.39
8.1.60.0090.00017.43
8.1.50.0080.00017.48
8.1.40.0040.00417.46
8.1.30.0000.00717.48
8.1.20.0000.00817.55
8.1.10.0020.00517.60
8.1.00.0000.00817.51
8.0.300.0070.00020.07
8.0.290.0000.00716.63
8.0.280.0070.00018.45
8.0.270.0030.00317.95
8.0.260.0000.00716.70
8.0.250.0040.00416.96
8.0.240.0030.00316.90
8.0.230.0030.00316.99
8.0.220.0000.00716.95
8.0.210.0070.00016.85
8.0.200.0030.00316.95
8.0.190.0000.00716.88
8.0.180.0000.00716.88
8.0.170.0040.00416.89
8.0.160.0000.00717.01
8.0.150.0000.00816.70
8.0.140.0040.00416.74
8.0.130.0000.00513.37
8.0.120.0040.00416.77
8.0.110.0050.00316.93
8.0.100.0040.00416.85
8.0.90.0080.00016.93
8.0.80.0050.01316.87
8.0.70.0050.00316.97
8.0.60.0040.00416.94
8.0.50.0040.00416.77
8.0.30.0130.01016.88
8.0.20.0090.01016.91
8.0.10.0040.00416.85
8.0.00.0100.01416.82
7.4.330.0040.00015.55
7.4.320.0000.00616.60
7.4.300.0040.00416.55
7.4.290.0040.00416.59
7.4.280.0040.00416.58
7.4.270.0030.00316.52
7.4.260.0030.00313.33
7.4.250.0030.00316.40
7.4.240.0000.00716.36
7.4.230.0000.00716.39
7.4.220.0030.00316.42
7.4.210.0110.00416.53
7.4.200.0000.00716.52
7.4.130.0130.00516.43
7.4.120.0170.00316.37
7.4.110.0100.01016.43
7.4.100.0040.01216.56
7.4.90.0060.01016.44
7.4.80.0110.00619.39
7.4.70.0060.01216.63
7.4.60.0100.00716.30
7.4.50.0070.00716.50
7.4.40.0140.00516.10
7.4.30.0090.00916.33
7.4.20.0090.00916.44
7.4.10.0030.01316.58
7.4.00.0090.00916.27
7.3.330.0070.00016.17
7.3.320.0000.00613.09
7.3.310.0000.00716.21
7.3.300.0000.00716.24
7.3.290.0090.00916.24
7.3.280.0090.00616.15
7.3.260.0140.00816.49
7.3.230.0070.01016.56
7.3.210.0070.01016.23
7.3.200.0090.00916.53
7.3.190.0070.01016.35
7.3.180.0100.01016.62
7.3.170.0090.00616.54
7.3.160.0110.00716.67
7.3.150.0100.00716.43
7.3.140.0130.00316.68
7.3.130.0130.00316.43
7.3.120.0080.00816.58
7.3.110.0030.01716.51
7.3.100.0030.01416.59
7.3.90.0110.01216.43
7.3.80.0100.00716.55
7.3.70.0060.00916.11
7.3.60.0160.00616.37
7.3.50.0060.01316.23
7.3.40.0100.00716.51
7.3.30.0100.00616.32
7.3.20.0170.00018.24
7.3.10.0030.01518.11
7.3.00.0070.01318.18
7.2.330.0120.00616.60
7.2.320.0100.00716.49
7.2.310.0100.00716.79
7.2.300.0100.01016.29
7.2.290.0100.00716.43
7.2.280.0060.00916.69
7.2.270.0110.00816.42
7.2.260.0070.01016.32
7.2.250.0070.01416.47
7.2.240.0120.00916.41
7.2.230.0130.00616.69
7.2.220.0100.00916.68
7.2.210.0140.00316.75
7.2.200.0070.01116.44
7.2.190.0090.00916.24
7.2.180.0070.01616.52
7.2.170.0150.00916.56
7.2.160.0110.00616.32
7.2.150.0060.01318.53
7.2.140.0080.01218.35
7.2.130.0150.00318.42
7.2.120.0110.01118.51
7.2.110.0090.01218.33
7.2.100.0140.00418.30
7.2.90.0100.01018.38
7.2.80.0060.01318.39
7.2.70.0030.01318.29
7.2.60.0070.01018.46
7.2.50.0090.00918.32
7.2.40.0030.01518.19
7.2.30.0120.00618.46
7.2.20.0070.01018.44
7.2.10.0120.00618.26
7.2.00.0120.00618.28

preferences:
29.91 ms | 401 KiB | 5 Q