3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = '$file%s = $entity->getForm%s(); if ($file%s) { $filename%s = uniqid() . \'.\' . $file%s->getClientOriginalExtension(); $this->filesystem->write($filename%s, file_get_contents($file%s->getPathname())); $this->filesystem->delete(substr($entity->get%s(), strrpos($entity->get%s(), \'/\'))); $entity->set%s(\'/imgs/upload/service/\' . $filename%s); }'; $elements = array( '1' => 'Photo', '2' => 'Icon', '3' => 'TopPhoto', '4' => 'DescriptionPhoto', '5' => 'BenefitPhoto', '6' => 'IndicationPhoto', '7' => 'PreparationPhoto', ); foreach ($elements as $key => $element) { echo sprintf($string, $key, $element, $key, $key, $key, $key, $key, $element, $element, $element, $key)."\n"."\n"; }

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.0140.00016.50
8.3.50.0150.00522.06
8.3.40.0120.00618.80
8.3.30.0100.01019.00
8.3.20.0040.00420.09
8.3.10.0040.00421.71
8.3.00.0050.00319.26
8.2.180.0150.00416.63
8.2.170.0070.01422.96
8.2.160.0100.00320.53
8.2.150.0040.00424.18
8.2.140.0030.00624.66
8.2.130.0000.00726.16
8.2.120.0080.00019.77
8.2.110.0060.00320.29
8.2.100.0100.00017.72
8.2.90.0070.00019.05
8.2.80.0040.00417.97
8.2.70.0030.00617.63
8.2.60.0040.00417.93
8.2.50.0050.00318.07
8.2.40.0060.00318.22
8.2.30.0030.00518.07
8.2.20.0040.00417.76
8.2.10.0080.00018.09
8.2.00.0000.00717.67
8.1.280.0180.00025.92
8.1.270.0080.00020.73
8.1.260.0070.00026.35
8.1.250.0070.00028.09
8.1.240.0090.00022.00
8.1.230.0000.01221.00
8.1.220.0050.00317.74
8.1.210.0050.00318.77
8.1.200.0070.00317.23
8.1.190.0030.00517.13
8.1.180.0070.00718.10
8.1.170.0030.00620.28
8.1.160.0000.00822.01
8.1.150.0040.00418.95
8.1.140.0030.00617.37
8.1.130.0000.00717.79
8.1.120.0040.00417.55
8.1.110.0040.00417.36
8.1.100.0030.00417.33
8.1.90.0000.00717.39
8.1.80.0000.00717.49
8.1.70.0000.00717.42
8.1.60.0060.00317.61
8.1.50.0050.00317.55
8.1.40.0000.00717.46
8.1.30.0030.00517.55
8.1.20.0040.00417.67
8.1.10.0000.00717.49
8.1.00.0040.00417.34
8.0.300.0000.00818.77
8.0.290.0030.00316.75
8.0.280.0000.00718.44
8.0.270.0040.00417.26
8.0.260.0000.00617.22
8.0.250.0030.00316.98
8.0.240.0070.00016.95
8.0.230.0050.00317.00
8.0.220.0030.00316.93
8.0.210.0070.00016.77
8.0.200.0060.00016.84
8.0.190.0040.00416.84
8.0.180.0030.00516.96
8.0.170.0050.00316.97
8.0.160.0030.00316.92
8.0.150.0070.00016.75
8.0.140.0000.00816.87
8.0.130.0030.00413.32
8.0.120.0000.00716.84
8.0.110.0080.00016.78
8.0.100.0040.00416.77
8.0.90.0040.00416.84
8.0.80.0030.01316.91
8.0.70.0080.00016.86
8.0.60.0000.00816.71
8.0.50.0000.00716.95
8.0.30.0090.01217.12
8.0.20.0120.00617.40
8.0.10.0040.00417.00
8.0.00.0140.00516.93
7.4.330.0050.00015.16
7.4.320.0000.00716.61
7.4.300.0030.00316.43
7.4.290.0070.00016.52
7.4.280.0020.00516.54
7.4.270.0000.00716.53
7.4.260.0030.00716.60
7.4.250.0040.00416.43
7.4.240.0050.00316.58
7.4.230.0070.00016.55
7.4.220.0030.01516.64
7.4.210.0090.00916.58
7.4.200.0030.00316.41
7.4.160.0070.01616.28
7.4.150.0100.00717.40
7.4.140.0120.00817.86
7.4.130.0160.00216.44
7.4.120.0070.01016.49
7.4.110.0070.01316.50
7.4.100.0120.00616.43
7.4.90.0060.01216.28
7.4.80.0110.01119.39
7.4.70.0070.01016.37
7.4.60.0070.01016.50
7.4.50.0000.00516.49
7.4.40.0060.00916.22
7.4.30.0090.01016.50
7.4.00.0060.00914.86
7.3.330.0000.00613.20
7.3.320.0090.00413.21
7.3.310.0070.00016.13
7.3.300.0000.00716.26
7.3.290.0000.00716.29
7.3.280.0090.00816.30
7.3.270.0110.00617.40
7.3.260.0150.00316.59
7.3.250.0080.00916.45
7.3.240.0140.00316.54
7.3.230.0110.00916.39
7.3.210.0090.00616.53
7.3.200.0100.01019.39
7.3.190.0150.00616.26
7.3.180.0140.00616.42
7.3.170.0130.00716.41
7.3.160.0140.00716.52
7.2.330.0100.00716.72
7.2.320.0140.00316.73
7.2.310.0070.01316.63
7.2.300.0060.01016.61
7.2.290.0100.01016.36
7.2.60.0280.00616.91
7.2.00.0130.01619.21
7.1.200.0000.01415.67
7.1.100.0000.01117.96
7.1.70.0090.00317.04
7.1.60.0090.00619.50
7.1.50.0090.01316.95
7.1.00.0070.08722.30
7.0.200.0630.00714.75
7.0.140.0070.07022.18
7.0.60.0130.07019.92
7.0.50.0030.06017.80
7.0.40.0100.08720.23
7.0.30.0330.08020.39
7.0.20.0200.04319.99
7.0.10.0200.04020.20
7.0.00.0070.07320.01
5.6.280.0030.07321.01
5.6.210.0070.06320.54
5.6.200.0070.08318.23
5.6.190.0070.08320.60
5.6.180.0230.05320.37
5.6.170.0570.06720.49
5.6.160.0070.05320.49
5.6.150.0100.03318.18
5.6.140.0000.04318.12
5.6.130.0100.08018.21
5.6.120.0100.08020.98
5.6.110.0070.08020.98
5.6.100.0130.08321.13
5.6.90.0130.07720.97
5.6.80.0130.06020.40
5.6.70.0170.07720.36
5.5.350.0230.07720.36
5.5.340.0070.08017.95
5.5.330.0100.08720.42
5.5.320.0100.04720.40
5.5.310.0330.04320.21
5.5.300.0100.03718.02
5.5.290.0000.06017.95
5.5.280.0000.06020.85
5.5.270.0130.07720.95
5.5.260.0170.07320.84
5.5.250.0130.07020.71
5.5.240.0000.08320.16
5.4.450.0170.05319.55
5.4.440.1000.05319.49
5.4.430.0930.07019.47
5.4.420.0900.05019.10
5.4.410.0800.07019.19
5.4.400.1070.07018.71
5.4.390.1070.05018.63
5.4.380.0930.06718.69
5.4.370.1000.06718.46
5.4.360.1070.05018.66
5.4.350.0900.06018.46
5.4.340.0970.05318.80
5.4.320.0970.05718.53
5.4.310.1000.05318.54
5.4.300.0930.06318.62
5.4.290.1070.07018.68
5.4.280.1270.05318.59
5.4.270.1070.05318.64
5.4.260.0970.05018.48
5.4.250.0900.05718.67
5.4.240.0930.05018.68
5.4.230.0900.05018.63
5.4.220.1000.05718.62
5.4.210.1000.05718.68
5.4.200.1100.05016.56
5.4.190.1130.05318.63
5.4.180.1100.05018.44
5.4.170.1030.05318.41
5.4.160.1030.05318.41
5.4.150.0930.06018.68
5.4.140.0900.05316.31
5.4.130.0970.04716.27
5.4.120.0970.04716.14
5.4.110.0930.05016.20
5.4.100.0930.06316.22
5.4.90.1000.05316.14
5.4.80.1130.06016.05
5.4.70.1130.05716.33
5.4.60.1100.05316.26
5.4.50.1170.04716.29
5.4.40.0930.06016.22
5.4.30.0930.06016.21
5.4.20.0930.04716.13
5.4.10.1000.04716.05
5.4.00.1070.07015.52
5.3.290.0930.06014.67
5.3.280.0870.05314.53
5.3.270.1030.05014.54
5.3.260.0900.05714.51
5.3.250.0930.05014.54
5.3.240.1100.07014.61
5.3.230.0900.05714.52
5.3.220.1070.06314.55
5.3.210.0930.05314.50
5.3.200.1030.05314.52
5.3.190.1030.05714.47
5.3.180.1000.05314.52
5.3.170.0870.05314.56
5.3.160.0970.04714.48
5.3.150.0900.06314.50
5.3.140.1070.05714.66
5.3.130.1270.04714.48
5.3.120.1000.05314.51
5.3.110.1030.06714.55
5.3.100.0930.05713.98
5.3.90.0900.04713.96
5.3.80.0870.05314.09
5.3.70.0970.05313.91
5.3.60.1000.05014.08
5.3.50.0930.05313.91
5.3.40.0970.05313.87
5.3.30.1000.04313.88
5.3.20.1170.05713.69
5.3.10.1100.05713.76
5.3.00.1170.05713.57
5.2.170.0970.05311.11
5.2.160.0770.04011.18
5.2.150.0670.05011.18
5.2.140.0800.03311.29
5.2.130.0630.05011.14
5.2.120.0670.04711.06
5.2.110.0630.05311.11
5.2.100.0730.04011.03
5.2.90.0770.04711.04
5.2.80.0730.04311.16
5.2.70.0770.04011.13
5.2.60.0970.04311.05
5.2.50.0800.04011.16
5.2.40.0700.03711.15
5.2.30.0630.04310.98
5.2.20.0670.04311.07
5.2.10.0600.04710.88
5.2.00.0600.04710.82
5.1.60.0670.03710.03
5.1.50.0570.03710.07
5.1.40.0530.0409.99
5.1.30.0570.04310.53
5.1.20.0730.03310.36
5.1.10.0700.03710.19
5.1.00.0730.03710.17
5.0.50.0370.0278.54
5.0.40.0330.0308.44
5.0.30.0300.0508.35
5.0.20.0330.0308.27
5.0.10.0230.0378.21
5.0.00.0400.0378.25
4.4.90.0300.0235.87
4.4.80.0370.0275.86
4.4.70.0370.0205.94
4.4.60.0300.0275.89
4.4.50.0330.0235.96
4.4.40.0370.0475.90
4.4.30.0370.0305.89
4.4.20.0300.0305.90
4.4.10.0400.0275.97
4.4.00.0300.0436.02
4.3.110.0370.0305.83
4.3.100.0330.0305.75
4.3.90.0300.0205.78
4.3.80.0330.0305.77
4.3.70.0400.0275.79
4.3.60.0370.0175.79
4.3.50.0430.0205.88
4.3.40.0300.0375.74
4.3.30.0230.0174.91
4.3.20.0170.0204.91
4.3.10.0130.0234.91
4.3.00.0000.0237.31

preferences:
54.08 ms | 401 KiB | 5 Q