3v4l.org

run code in 300+ PHP versions simultaneously
<?php function is_cyclic(array &$array) { json_encode($array); return json_last_error() === JSON_ERROR_RECURSION; } $array = [1, [2, 3]]; $array[1][1] = &$array; var_dump(is_cyclic($array));

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.140.0110.00716.72
8.3.130.0100.00718.57
8.3.120.0150.00320.91
8.3.110.0060.00320.94
8.3.100.0040.01224.06
8.3.90.0100.00326.77
8.3.80.0060.00319.36
8.3.70.0080.00816.58
8.3.60.0100.00718.50
8.3.50.0120.00723.57
8.3.40.0070.00718.80
8.3.30.0090.00618.84
8.3.20.0000.00724.18
8.3.10.0000.00824.66
8.3.00.0050.00226.16
8.2.250.0060.00618.45
8.2.240.0080.00418.83
8.2.230.0100.00022.58
8.2.220.0060.00337.54
8.2.210.0080.00026.77
8.2.200.0060.00318.88
8.2.190.0070.01416.58
8.2.180.0170.00325.92
8.2.170.0070.00719.02
8.2.160.0030.01022.96
8.2.150.0080.00025.66
8.2.140.0070.00024.66
8.2.130.0040.00426.16
8.2.120.0050.00226.16
8.2.110.0090.00020.88
8.2.100.0090.00317.78
8.2.90.0030.00619.28
8.2.80.0040.00417.97
8.2.70.0050.00317.93
8.2.60.0050.00317.93
8.2.50.0040.00818.07
8.2.40.0070.00018.09
8.2.30.0030.00517.95
8.2.20.0000.00818.02
8.2.10.0050.00319.29
8.2.00.0020.00519.18
8.1.300.0030.00617.79
8.1.290.0030.00630.84
8.1.280.0030.01725.92
8.1.270.0040.00423.99
8.1.260.0080.00026.35
8.1.250.0050.00328.09
8.1.240.0040.00422.51
8.1.230.0080.00320.89
8.1.220.0000.00817.74
8.1.210.0000.00818.91
8.1.200.0090.00017.35
8.1.190.0060.00317.11
8.1.180.0050.00318.10
8.1.170.0030.00518.59
8.1.160.0000.00718.83
8.1.150.0050.00218.83
8.1.140.0000.00718.87
8.1.130.0060.00317.31
8.1.120.0030.00317.38
8.1.110.0060.00317.46
8.1.100.0100.00017.32
8.1.90.0000.00717.45
8.1.80.0070.00317.37
8.1.70.0000.00717.45
8.1.60.0040.00417.57
8.1.50.0050.00317.51
8.1.40.0030.00617.56
8.1.30.0040.00417.56
8.1.20.0040.00417.60
8.1.10.0000.00717.50
8.1.00.0000.00817.43
8.0.300.0030.00519.90
8.0.290.0100.00016.75
8.0.280.0030.00320.10
8.0.270.0030.00317.92
8.0.260.0030.00316.82
8.0.250.0000.00716.99
8.0.240.0070.00016.84
8.0.230.0030.00316.89
8.0.220.0030.00316.86
8.0.210.0000.00716.79
8.0.200.0000.00716.95
8.0.190.0030.00417.00
8.0.180.0000.00716.93
8.0.170.0060.00316.91
8.0.160.0040.00416.90
8.0.150.0080.00016.79
8.0.140.0000.00716.87
8.0.130.0030.00313.39
8.0.120.0000.00816.88
8.0.110.0000.00816.91
8.0.100.0040.00416.75
8.0.90.0040.00416.94
8.0.80.0090.01016.84
8.0.70.0040.00416.96
8.0.60.0070.00016.76
8.0.50.0040.00416.91
8.0.30.0060.00916.83
8.0.20.0140.00417.29
8.0.10.0040.00416.84
8.0.00.0120.01117.86
7.4.330.0050.00015.55
7.4.320.0080.00016.59
7.4.300.0040.00416.38
7.4.290.0000.00816.56
7.4.280.0030.00716.55
7.4.270.0030.00316.62
7.4.260.0060.00013.22
7.4.250.0000.00716.48
7.4.240.0030.00316.42
7.4.230.0000.00716.40
7.4.220.0000.00716.48
7.4.210.0080.00816.55
7.4.200.0000.00716.39
7.4.140.0120.00917.86
7.4.130.0100.01117.86
7.4.120.0110.00817.86
7.4.110.0090.00917.86
7.4.100.0100.01017.86
7.4.90.0090.01017.86
7.4.80.0140.00917.86
7.4.70.0070.01117.86
7.4.60.0090.01217.86
7.4.50.0110.00617.86
7.4.40.0110.00917.86
7.4.30.0140.00717.86
7.4.20.0130.00617.86
7.4.10.0090.01417.86
7.4.00.0150.01217.86
7.3.330.0070.00016.33
7.3.320.0030.00313.22
7.3.310.0070.00016.13
7.3.300.0060.00016.32
7.3.290.0110.00416.27
7.3.260.0100.01417.86
7.3.250.0110.00717.86
7.3.240.0110.00817.86
7.3.230.0160.00617.86
7.3.220.0120.00617.86
7.3.210.0070.01417.86
7.3.200.0110.01117.86
7.3.190.0110.00817.86
7.3.180.0070.01117.86
7.3.170.0100.01117.86
7.3.160.0090.01217.86
7.3.150.0090.00917.86
7.3.140.0100.01117.86
7.3.130.0130.01017.86
7.3.120.0090.00917.86
7.3.110.0130.01017.86
7.3.100.0090.01117.86
7.3.90.0080.01117.86
7.3.80.0080.01417.86
7.3.70.0070.01417.86
7.3.60.0110.00717.86
7.3.50.0040.01517.86
7.3.40.0070.01117.86
7.3.30.0080.01117.86
7.3.20.0110.00817.86
7.3.10.0120.01217.86
7.3.00.0120.01217.86

preferences:
52.94 ms | 403 KiB | 5 Q