3v4l.org

run code in 300+ PHP versions simultaneously
<?php header("Access-Control-Allow-Origin: *"); $json_string = '{ "nodes": [ { "id": "0", "type": "food" }, { "id": "1", "type": "drinks" }, { "id": "2", "type": "snacks" }, { "id": "3", "type": "food" }, { "id": "4", "type": "drinks" } ], "links": [ { "source": "0", "target": "1"}, { "source": "1", "target": "2"}, { "source": "2", "target": "0"} ] }'; // converts json_string to array $json = json_decode($json_string); printf("%s\n", json_encode($json, JSON_PRETTY_PRINT)); unset($json -> nodes[3]); printf("%s\n", json_encode($json, JSON_PRETTY_PRINT)); $json = array_values($json); $json = json_encode($json); printf("%s\n", $json) ?>

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.4.130.0080.00917.93
8.4.120.0120.00722.25
8.4.110.0120.00822.40
8.4.100.0100.01018.89
8.4.90.0110.00922.38
8.4.80.0080.00318.03
8.4.70.0100.01218.11
8.4.60.0110.00520.60
8.4.50.0150.00717.85
8.4.40.0060.00319.64
8.4.30.0090.01218.61
8.4.20.0130.00319.07
8.4.10.0040.00419.63
8.3.260.0140.00716.71
8.3.250.0100.00818.77
8.3.240.0160.00316.70
8.3.230.0120.00716.64
8.3.220.0050.00317.29
8.3.210.0110.00716.73
8.3.200.0050.00516.63
8.3.190.0130.00619.01
8.3.180.0130.00718.63
8.3.170.0090.00917.19
8.3.160.0180.00018.71
8.3.150.0110.00720.89
8.3.140.0110.00716.82
8.3.130.0100.00016.70
8.3.120.0030.00620.76
8.3.110.0070.00720.94
8.3.100.0090.00024.06
8.3.90.0080.00026.77
8.3.80.0100.00019.36
8.3.70.0090.00616.58
8.3.60.0100.00716.75
8.3.50.0130.00616.37
8.3.40.0060.01218.72
8.3.30.0060.00918.62
8.3.20.0040.00424.18
8.3.10.0040.00424.66
8.3.00.0040.00426.16
8.2.290.0060.00222.39
8.2.280.0140.00520.00
8.2.270.0130.00617.28
8.2.260.0080.00018.84
8.2.250.0160.00016.54
8.2.240.0030.00618.94
8.2.230.0050.00522.58
8.2.220.0040.00437.54
8.2.210.0040.01126.77
8.2.200.0040.00418.88
8.2.190.0120.00918.54
8.2.180.0070.01125.92
8.2.170.0040.01118.91
8.2.160.0130.00022.96
8.2.150.0040.00425.66
8.2.140.0050.00324.66
8.2.130.0080.00026.16
8.2.120.0000.00719.73
8.2.110.0060.00320.53
8.2.100.0080.00417.72
8.2.90.0080.00019.22
8.2.80.0050.00317.97
8.2.70.0050.00317.63
8.2.60.0000.00817.92
8.2.50.0000.00818.05
8.2.40.0080.00018.16
8.2.30.0000.00718.11
8.2.20.0040.00418.09
8.2.10.0060.00319.35
8.2.00.0040.00419.35
8.1.330.0090.01021.86
8.1.320.0070.01216.50
8.1.310.0000.00817.01
8.1.300.0000.00820.30
8.1.290.0060.00330.84
8.1.280.0070.00725.92
8.1.270.0040.00423.99
8.1.260.0090.00026.35
8.1.250.0050.00328.09
8.1.240.0060.00323.97
8.1.230.0090.00317.83
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0040.00717.35
8.1.190.0040.00417.11
8.1.180.0080.00018.10
8.1.170.0040.00418.51
8.1.160.0080.00019.04
8.1.150.0030.00318.72
8.1.140.0070.00018.85
8.1.130.0030.00320.11
8.1.120.0040.00417.41
8.1.110.0040.00417.40
8.1.100.0040.00417.43
8.1.90.0000.00717.42
8.1.80.0040.00417.46
8.1.70.0070.00017.30
8.1.60.0030.00617.61
8.1.50.0040.00417.54
8.1.40.0040.00417.44
8.1.30.0000.00717.55
8.1.20.0040.00417.63
8.1.10.0000.00817.61
8.1.00.0040.00417.51
8.0.300.0000.00718.77
8.0.290.0020.00516.75
8.0.280.0000.00718.38
8.0.270.0080.00018.02
8.0.260.0030.00318.52
8.0.250.0030.00317.05
8.0.240.0000.00716.94
8.0.230.0080.00017.06
8.0.220.0050.00216.99
8.0.210.0000.00716.99
8.0.200.0030.00517.03
8.0.190.0030.00616.93
8.0.180.0000.00716.93
8.0.170.0060.00317.01
8.0.160.0030.00616.98
8.0.150.0000.00716.91
8.0.140.0030.00516.97
8.0.130.0050.00013.50
8.0.120.0080.00017.00
8.0.110.0070.00016.89
8.0.100.0040.00416.99
8.0.90.0000.00717.00
8.0.80.0000.01517.00
8.0.70.0000.00716.84
8.0.60.0070.00016.99
8.0.50.0000.00717.02
8.0.30.0090.00616.82
8.0.20.0190.01316.99
8.0.10.0200.00917.01
8.0.00.0150.01417.07
7.4.330.0020.00215.55
7.4.320.0030.00316.61
7.4.300.0060.00016.58
7.4.290.0040.00416.57
7.4.280.0050.00316.50
7.4.270.0080.00016.55
7.4.260.0000.00613.20
7.4.250.0030.00316.55
7.4.240.0030.00316.65
7.4.230.0000.00716.34
7.4.220.0020.00616.68
7.4.210.0110.00416.65
7.4.200.0030.00316.60
7.4.160.0190.00816.69
7.4.150.0140.01416.63
7.4.140.0220.01516.42
7.4.130.0190.00816.50
7.4.120.0200.01316.46
7.4.110.0090.01916.49
7.4.100.0260.00316.45
7.4.90.0220.01116.39
7.4.80.0120.01616.63
7.4.70.0200.00616.36
7.4.60.0360.01216.55
7.4.50.0200.00916.50
7.4.40.0180.01116.25
7.4.30.0100.01016.44
7.4.20.0150.00616.58
7.4.10.0130.00616.39
7.4.00.0080.00816.56
7.3.330.0000.00716.39
7.3.320.0050.00013.29
7.3.310.0000.00716.20
7.3.300.0040.00416.25
7.3.290.0060.01116.41
7.3.280.0190.01216.27
7.3.270.0200.00816.32
7.3.260.0220.01016.32
7.3.250.0250.00616.32
7.3.240.0240.00716.40
7.3.230.0200.01016.21
7.3.220.0220.00916.29
7.3.210.0160.01616.20
7.3.200.0240.00716.23
7.3.190.0160.01016.34
7.3.180.0180.01416.31
7.3.170.0280.00416.26
7.3.160.0000.01616.32
7.3.150.0110.00816.36
7.3.140.0130.00316.23
7.3.130.0080.00816.21
7.3.120.0120.00516.32
7.3.110.0120.00616.22
7.3.100.0110.00716.25
7.3.90.0030.01316.66
7.3.80.0080.01216.23
7.3.70.0210.00916.32
7.3.60.0290.00416.36
7.3.50.0330.01216.47
7.3.40.0140.01016.51
7.3.30.0170.00916.32
7.3.20.0220.00416.34
7.3.10.0100.01016.34
7.3.00.0180.01216.39

preferences:
143.05 ms | 403 KiB | 5 Q