3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(-1); $data = array ( 'tram B' => array ( 0 => array ( 'name' => 'Ile Verte' , 'distance' => 298, 'stationID' => 762, ), 1 => array ( 'name' => 'La Tronche Hôpital' , 'distance' => 425, 'stationID' => 771, ), ), 16 => array ( 0 => array ( 'name' => 'Bastille', 'distance' => 531, 'stationID' => 397 ), 1 => array ( 'name' => 'Xavier Jouvin', 'distance' => 589, 'stationID' => 438, ), ), ); $data['tram B'][1]['name'] = iconv('UTF8', 'ISO-8859-1', $data['tram B'][1]['name']); $fromEncoding = 'ISO-8859-1'; // This depends on the data array_walk_recursive($data, function (&$value, $key, $fromEncoding) { if (is_string($value)) { $value = iconv($fromEncoding, 'UTF-8', $value); } }, $fromEncoding); var_dump( mb_detect_order(), mb_detect_encoding($data['tram B'][1]['name']), mb_detect_encoding($data['tram B'][1]['name'], array('ISO-8859-1', 'UTF-8')), json_encode($data) );

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.0180.00416.63
8.3.60.0110.01118.43
8.3.50.0090.00922.11
8.3.40.0120.00618.73
8.3.30.0080.00818.96
8.3.20.0040.00418.69
8.3.10.0080.00021.10
8.3.00.0040.00419.78
8.2.180.0100.01317.00
8.2.170.0070.00722.96
8.2.160.0030.01020.55
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0080.00021.03
8.2.110.0100.00019.46
8.2.100.0030.00718.09
8.2.90.0040.00419.33
8.2.80.0080.00017.97
8.2.70.0000.00917.49
8.2.60.0040.00418.18
8.2.50.0050.00318.07
8.2.40.0050.00318.18
8.2.30.0040.00421.40
8.2.20.0040.00417.83
8.2.10.0060.00317.80
8.2.00.0090.00217.88
8.1.280.0070.00725.92
8.1.270.0000.00823.99
8.1.260.0000.00726.35
8.1.250.0050.00328.09
8.1.240.0030.00624.11
8.1.230.0060.00620.96
8.1.220.0080.00018.77
8.1.210.0000.00819.01
8.1.200.0060.00317.60
8.1.190.0000.00817.78
8.1.180.0090.00018.10
8.1.170.0040.00418.77
8.1.160.0030.00619.07
8.1.150.0000.00718.84
8.1.140.0060.00317.56
8.1.130.0050.00317.84
8.1.120.0050.00317.55
8.1.110.0090.00017.68
8.1.100.0040.00417.65
8.1.90.0040.00417.62
8.1.80.0000.00817.64
8.1.70.0030.00317.55
8.1.60.0030.00617.66
8.1.50.0040.00417.65
8.1.40.0040.00417.77
8.1.30.0030.00617.78
8.1.20.0000.00817.80
8.1.10.0110.00017.73
8.1.00.0000.00917.66
8.0.300.0040.00420.01
8.0.290.0000.00817.25
8.0.280.0060.00318.47
8.0.270.0040.00417.37
8.0.260.0030.00317.00
8.0.250.0000.00817.14
8.0.240.0100.00017.01
8.0.230.0040.00417.09
8.0.220.0030.00316.95
8.0.210.0080.00016.89
8.0.200.0090.00017.05
8.0.190.0030.00317.08
8.0.180.0040.00417.02
8.0.170.0040.00417.00
8.0.160.0000.00817.11
8.0.150.0040.00416.91
8.0.140.0070.00016.99
8.0.130.0000.00513.31
8.0.120.0040.00417.05
8.0.110.0060.00317.18
8.0.100.0060.00317.21
8.0.90.0060.00317.30
8.0.80.0120.00617.21
8.0.70.0000.00817.22
8.0.60.0060.00317.22
8.0.50.0030.00717.03
8.0.30.0060.01517.37
8.0.20.0120.01517.40
8.0.10.0040.00417.19
8.0.00.0100.00916.83
7.4.330.0000.00516.66
7.4.320.0000.00716.57
7.4.300.0000.00616.58
7.4.290.0070.00016.68
7.4.280.0000.00716.70
7.4.270.0030.00316.68
7.4.260.0030.00313.24
7.4.250.0050.00516.75
7.4.240.0040.00416.81
7.4.230.0080.00016.75
7.4.220.0090.01516.80
7.4.210.0090.01116.81
7.4.200.0030.00616.90
7.4.190.0030.00616.93
7.4.160.0090.00916.83
7.4.150.0090.01117.40
7.4.140.0090.01017.86
7.4.130.0120.01516.73
7.4.120.0100.00916.78
7.4.110.0150.01216.71
7.4.100.0090.01416.73
7.4.90.0100.01016.74
7.4.80.0090.00919.39
7.4.70.0190.00916.69
7.4.60.0190.01316.79
7.4.50.0110.00816.71
7.4.40.0100.01319.76
7.4.30.0220.01116.79
7.4.20.0110.02216.52
7.4.10.0100.02416.82
7.4.00.0130.00815.98
7.3.330.0000.00613.23
7.3.320.0050.00213.29
7.3.310.0040.00416.45
7.3.300.0030.00516.48
7.3.290.0030.01216.61
7.3.280.0110.01016.58
7.3.270.0070.01317.40
7.3.260.0140.01018.24
7.3.250.0070.01516.82
7.3.240.0120.00916.52
7.3.230.0070.01316.65
7.3.210.0130.01416.66
7.3.200.0100.01416.97
7.3.190.0130.01116.57
7.3.180.0140.01016.71
7.3.170.0190.00516.66
7.3.160.0150.01016.56
7.3.150.0330.00916.60
7.3.140.0320.01016.32
7.3.130.0210.01416.55
7.3.120.0150.00816.03
7.3.110.0160.00816.59
7.3.100.0210.01116.45
7.3.90.0160.01716.74
7.3.80.0250.01016.72
7.3.70.0130.01316.64
7.3.60.0200.00016.36
7.3.50.0150.00916.58
7.3.40.0100.01316.60
7.3.30.0120.01616.40
7.3.20.0080.01416.61
7.3.10.0110.00816.63
7.3.00.0300.01016.74
7.2.330.0060.01316.73
7.2.320.0090.01016.95
7.2.310.0200.01016.80
7.2.300.0220.00816.83
7.2.290.0130.01116.98
7.2.280.0210.00816.80
7.2.270.0280.00917.01
7.2.260.0250.00716.67
7.2.250.0210.01017.15
7.2.240.0200.01216.70
7.2.230.0160.01616.61
7.2.220.0180.01116.75
7.2.210.0150.01116.89
7.2.200.0090.01516.70
7.2.190.0180.00816.54
7.2.180.0050.01716.84
7.2.170.0150.01516.96
7.2.160.0100.01316.66
7.2.150.0140.01116.66
7.2.140.0170.00716.64
7.2.130.0110.00616.75
7.2.120.0050.01316.86
7.2.110.0140.00917.13
7.2.100.0070.01416.97
7.2.90.0090.01216.80
7.2.80.0090.01416.74
7.2.70.0130.00916.99
7.2.60.0060.01317.04
7.2.50.0110.00916.90
7.2.40.0040.01717.01
7.2.30.0100.00817.03
7.2.20.0060.01316.86
7.2.10.0070.01417.03
7.2.00.0020.01717.92
7.1.330.0140.01116.16
7.1.320.0130.01616.05
7.1.310.0140.00615.97
7.1.300.0420.00616.06
7.1.290.0180.00915.93
7.1.280.0100.01015.98
7.1.270.0070.01615.87
7.1.260.0090.01916.06
7.1.250.0130.00715.96
7.1.240.0170.01315.93
7.1.230.0620.01015.88
7.1.220.0120.00915.86
7.1.210.0150.00915.74
7.1.200.0060.01316.04
7.1.190.0090.00915.95
7.1.180.0130.00615.94
7.1.170.0580.00715.82
7.1.160.0120.00915.88
7.1.150.0070.01015.84
7.1.140.0120.01215.93
7.1.130.0090.01615.95
7.1.120.0100.01016.11
7.1.110.0170.01316.07
7.1.100.0140.01317.12
7.1.90.0080.01715.95
7.1.80.0210.01115.88
7.1.70.0100.01116.71
7.1.60.0150.00916.67
7.1.50.0090.01116.70
7.1.40.0110.01116.46
7.1.30.0180.00716.52
7.1.20.0490.00916.53
7.1.10.0160.00616.46
7.1.00.0130.01316.49
7.0.330.0160.01315.43
7.0.320.0030.01515.52
7.0.310.0110.00715.68
7.0.300.0130.00615.77
7.0.290.0070.01015.55
7.0.280.0100.01315.72
7.0.270.0110.01115.82
7.0.260.0070.01115.58
7.0.250.0210.00815.79
7.0.240.0200.01515.61
7.0.230.2030.01015.63
7.0.220.0170.01115.62
7.0.210.0200.00615.77
7.0.200.0090.01116.48
7.0.190.0130.00716.25
7.0.180.0120.00716.14
7.0.170.0110.01016.14
7.0.160.0110.01016.04
7.0.150.0140.00516.13
7.0.140.0060.01516.06
7.0.130.0190.00516.21
7.0.120.0120.00816.21
7.0.110.0140.01216.08
7.0.100.0140.00716.17
7.0.90.0110.00815.98
7.0.80.0100.00816.08
7.0.70.0080.01316.01
7.0.60.0160.00316.06
7.0.50.0100.01516.18
7.0.40.0130.01316.44
7.0.30.0130.00816.42
7.0.20.0140.00516.40
7.0.10.0100.00816.38
7.0.00.0100.01016.41
5.6.400.0140.00816.05
5.6.390.0170.01316.26
5.6.380.0080.01316.34
5.6.370.0160.00416.53
5.6.360.0110.01116.36
5.6.350.0120.00916.20
5.6.340.0070.01316.19
5.6.330.0090.01516.41
5.6.320.0220.01316.33
5.6.310.0200.00916.40
5.6.300.0110.03618.75
5.6.290.0100.03018.44
5.6.280.0130.03418.53
5.6.270.0130.05118.59
5.6.260.0090.03618.78
5.6.250.0110.03218.57
5.6.240.0140.03918.63
5.6.230.0140.02418.73
5.6.220.0100.03418.65
5.6.210.0080.03218.69
5.6.200.0140.02518.65
5.6.190.0080.03218.59
5.6.180.0140.02418.55
5.6.170.0130.02418.67
5.6.160.0120.02518.67
5.6.150.0090.04118.60
5.6.140.0140.03018.57
5.6.130.0100.02818.64
5.6.120.0120.02818.60
5.6.110.0210.02318.67
5.6.100.0160.04618.66
5.6.90.0150.02618.57
5.6.80.0190.03118.48
5.6.70.0110.02618.27
5.6.60.0070.03218.31
5.6.50.0190.02518.23
5.6.40.0130.02318.26
5.6.30.0130.02618.23
5.6.20.0100.02818.35
5.6.10.0070.03118.25
5.6.00.0100.02618.30
5.5.380.0120.02616.75
5.5.370.0120.02616.83
5.5.360.0090.02916.87
5.5.350.0120.02816.85
5.5.340.0090.02917.29
5.5.330.0150.02417.02
5.5.320.0130.02417.24
5.5.310.0110.03817.25
5.5.300.0120.02917.15
5.5.290.0130.04217.23
5.5.280.0170.03217.15
5.5.270.0130.04617.25
5.5.260.0110.05317.17
5.5.250.0110.02616.85
5.5.240.0190.03116.87
5.5.230.0100.02716.81
5.5.220.0150.02416.83
5.5.210.0080.02816.71
5.5.200.0070.03016.68
5.5.190.0130.02816.88
5.5.180.0110.02616.81
5.5.170.0200.00916.44
5.5.160.0080.03216.73
5.5.150.0040.03316.80
5.5.140.0100.02816.84
5.5.130.0090.02717.10
5.5.120.0060.03116.96
5.5.110.0160.03016.70
5.5.100.0090.02916.79
5.5.90.0100.02616.84
5.5.80.0100.02816.78
5.5.70.0090.03416.78
5.5.60.0110.02816.91
5.5.50.0070.03616.85
5.5.40.0130.02816.91
5.5.30.0100.04516.91
5.5.20.0100.02716.67
5.5.10.0090.03216.74
5.5.00.0120.02516.77
5.4.450.0100.02516.19
5.4.440.0070.04116.09
5.4.430.0100.04316.18
5.4.420.0110.04116.26
5.4.410.0110.02916.01
5.4.400.0120.02115.88
5.4.390.0070.02415.98
5.4.380.0090.02415.82
5.4.370.0070.02515.94
5.4.360.0110.02215.94
5.4.350.0170.02415.89
5.4.340.0160.02716.03
5.4.330.0110.01112.65
5.4.320.0120.02115.89
5.4.310.0120.02415.89
5.4.300.0100.02715.75
5.4.290.0130.01715.94
5.4.280.0200.02115.87
5.4.270.0090.03515.96
5.4.260.0080.02715.96
5.4.250.0100.02515.88
5.4.240.0090.02916.00
5.4.230.0140.03416.02
5.4.220.0080.02615.89
5.4.210.0070.02715.88
5.4.200.0080.02415.84
5.4.190.0080.02915.88
5.4.180.0060.04015.93
5.4.170.0090.03616.02
5.4.160.0110.02015.89
5.4.150.0110.02615.86
5.4.140.0080.03814.87
5.4.130.0060.02914.80
5.4.120.0130.02014.71
5.4.110.0070.02814.72
5.4.100.0090.02214.74
5.4.90.0100.03714.77
5.4.80.0120.02114.79
5.4.70.0050.02814.74
5.4.60.0080.02214.68
5.4.50.0140.02714.61
5.4.40.0060.02514.72
5.4.30.0100.02614.71
5.4.20.0050.03214.78
5.4.10.0130.02314.78
5.4.00.0100.02514.37
5.3.290.0120.02214.55
5.3.280.0060.02814.41
5.3.270.0070.02914.48
5.3.260.0090.05114.55
5.3.250.0110.02514.47
5.3.240.0100.02314.42
5.3.230.0230.02214.47
5.3.220.0070.02714.42
5.3.210.0090.03014.41
5.3.200.0090.02514.50
5.3.190.0090.02814.44
5.3.180.0110.03714.45
5.3.170.0150.01814.41
5.3.160.0120.02414.39
5.3.150.0060.02714.44
5.3.140.0110.02414.38
5.3.130.0060.03014.37
5.3.120.0190.03214.52
5.3.110.0060.03314.44
5.3.100.0080.04114.40
5.3.90.0070.02614.41
5.3.80.0150.04114.30
5.3.70.0050.03014.30
5.3.60.0070.02714.37
5.3.50.0070.04214.31
5.3.40.0120.03814.30
5.3.30.0090.02614.32
5.3.20.0060.02414.41
5.3.10.0110.02214.27
5.3.00.0100.02014.33
5.2.170.0090.01713.70
5.2.160.0070.03613.70
5.2.150.0050.02313.70
5.2.140.0070.02313.70
5.2.130.0050.01913.70
5.2.120.0070.02713.70
5.2.110.0100.01413.70
5.2.100.0080.01613.70
5.2.90.0060.02713.70
5.2.80.0050.03813.70
5.2.70.0050.02013.70
5.2.60.0050.02113.70
5.2.50.0060.02013.70
5.2.40.0050.03013.70
5.2.30.0060.02713.70
5.2.20.0060.02013.70
5.2.10.0090.02913.70
5.2.00.0090.02713.70
5.1.60.0090.02813.70
5.1.50.0030.01813.70
5.1.40.0110.01313.70
5.1.30.0070.01413.70
5.1.20.0040.02013.70
5.1.10.0030.02113.70
5.1.00.0070.02513.70
5.0.50.0060.01813.70
5.0.40.0070.01213.70
5.0.30.0130.02013.70
5.0.20.0060.01713.70
5.0.10.0060.01313.70
5.0.00.0060.01713.70
4.4.90.0040.01213.70
4.4.80.0070.00713.70
4.4.70.0050.00813.70
4.4.60.0060.01013.70
4.4.50.0020.01913.70
4.4.40.0060.01413.70
4.4.30.0050.01213.70
4.4.20.0050.01113.70
4.4.10.0020.01313.70
4.4.00.0020.01613.70
4.3.110.0020.01113.70
4.3.100.0060.01013.70
4.3.90.0070.01313.70
4.3.80.0010.01513.70
4.3.70.0040.00813.70
4.3.60.0050.00813.70
4.3.50.0030.01113.70
4.3.40.0030.01613.70
4.3.30.0030.02113.70
4.3.20.0070.01413.70
4.3.10.0040.01913.70
4.3.00.0040.01213.70

preferences:
41.95 ms | 401 KiB | 5 Q