3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getInstagramUrlFromMediaId($media_id) { $alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_'; $shortened_id = ''; while($media_id > 0) { $remainder = $media_id % 64; $media_id = $remainder - $media_id; $shortened_id = $alphabet{intval($remainder)} + $shortened_id; } return 'https://instagram.com/p/' + $shortened_id + '/'; } print_r(getInstagramUrlFromMediaId(179866));

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.0030.01318.43
8.3.50.0040.01118.18
8.3.40.0090.01318.85
8.3.30.0150.00018.73
8.3.20.0030.00618.99
8.3.10.0060.00318.90
8.3.00.0080.00017.68
8.2.180.0190.00016.38
8.2.170.0150.00322.96
8.2.160.0140.00719.08
8.2.150.0050.00325.66
8.2.140.0050.00324.66
8.2.130.0040.00419.52
8.2.120.0040.00426.35
8.2.110.0040.00421.11
8.2.100.0080.00417.78
8.2.90.0050.00317.75
8.2.80.0030.00918.61
8.2.70.0080.00017.91
8.2.60.0040.00417.68
8.2.50.0070.00018.10
8.2.40.0070.00018.97
8.2.30.0000.00719.19
8.2.20.0030.00517.95
8.2.10.0050.00217.87
8.2.00.0000.00719.34
8.1.280.0100.01025.92
8.1.270.0070.00023.82
8.1.260.0040.00426.35
8.1.250.0050.00228.09
8.1.240.0070.00323.77
8.1.230.0080.00322.67
8.1.220.0000.00918.38
8.1.210.0000.00818.77
8.1.200.0030.00617.22
8.1.190.0000.00817.22
8.1.180.0040.00418.10
8.1.170.0040.00418.55
8.1.160.0040.00418.75
8.1.150.0000.00818.63
8.1.140.0040.00417.57
8.1.130.0000.00719.00
8.1.120.0040.00417.26
8.1.110.0040.00417.27
8.1.100.0040.00417.25
8.1.90.0000.00917.29
8.1.80.0000.00817.23
8.1.70.0040.00417.25
8.1.60.0040.00717.41
8.1.50.0040.00417.40
8.1.40.0040.00417.44
8.1.30.0040.00417.53
8.1.20.0040.00417.54
8.1.10.0040.00417.27
8.1.00.0040.00417.41
8.0.300.0040.00419.74
8.0.290.0040.00416.63
8.0.280.0000.00718.30
8.0.270.0070.00017.13
8.0.260.0110.00017.18
8.0.250.0030.00316.76
8.0.240.0050.00316.76
8.0.230.0000.00816.77
8.0.220.0030.00516.79
8.0.210.0030.00316.82
8.0.200.0080.00016.87
8.0.190.0030.00616.90
8.0.180.0070.00016.88
8.0.170.0030.00616.72
8.0.160.0000.00916.86
8.0.150.0000.00716.83
8.0.140.0000.00716.72
8.0.130.0030.00613.30
8.0.120.0060.00316.64
8.0.110.0000.00716.71
8.0.100.0030.00516.79
8.0.90.0050.00216.78
8.0.80.0100.00816.87
8.0.70.0070.00016.79
8.0.60.0000.00816.83
8.0.50.0070.00016.82
8.0.30.0070.01216.99
8.0.20.0110.00817.40
8.0.10.0030.00516.82
8.0.00.0120.01216.67
7.4.330.0000.00515.55
7.4.320.0000.00616.50
7.4.300.0030.00316.43
7.4.290.0000.00716.52
7.4.280.0040.00416.51
7.4.270.0030.00316.65
7.4.260.0030.00316.60
7.4.250.0030.00316.49
7.4.240.0000.00816.50
7.4.230.0030.00316.39
7.4.220.0050.00316.71
7.4.210.0080.00816.59
7.4.200.0040.00416.43
7.4.160.0100.00916.59
7.4.140.0090.01117.86
7.4.130.0150.00716.63
7.4.120.0110.00716.51
7.4.110.0060.01016.52
7.4.100.0090.00916.67
7.4.90.0030.01516.50
7.4.80.0120.00619.39
7.4.70.0090.01216.66
7.4.60.0070.01116.58
7.4.50.0000.01216.38
7.4.40.0150.00316.44
7.4.00.0030.01314.95
7.3.330.0000.00513.44
7.3.320.0000.00513.35
7.3.310.0000.00716.40
7.3.300.0030.00316.39
7.3.290.0000.00816.24
7.3.280.0120.00316.37
7.3.260.0100.00716.44
7.3.240.0110.00616.48
7.3.230.0070.01016.40
7.3.210.0090.00916.41
7.3.200.0120.00616.68
7.3.190.0060.01016.38
7.3.180.0070.01016.37
7.3.170.0100.00716.31
7.3.160.0030.01816.66
7.2.330.0120.00616.88
7.2.320.0060.01216.55
7.2.310.0030.01416.57
7.2.300.0160.00616.83
7.2.290.0020.01516.75
7.2.60.2400.01015.01
7.2.50.1840.00914.96
7.2.40.2560.01215.19
7.2.30.2810.00615.38
7.2.20.2460.01315.13
7.2.10.2120.00815.33
7.2.00.0160.01015.39
7.1.200.0070.00015.95
7.1.170.1980.00813.93
7.1.160.2210.00716.75
7.1.150.2550.01117.02
7.1.140.2660.01516.94
7.1.130.2050.01517.13
7.1.120.0140.00916.88
7.1.110.2490.01016.23
7.1.100.0230.01016.29
7.1.90.2800.01016.12
7.1.80.0500.01416.17
7.1.70.2450.01415.29
7.1.60.2510.01533.20
7.1.50.2430.01333.04
7.1.40.2180.01332.35
7.1.30.2390.01332.63
7.1.20.1980.01332.70
7.1.10.0070.01214.63
7.1.00.0190.01214.86

preferences:
81.09 ms | 400 KiB | 5 Q