3v4l.org

run code in 300+ PHP versions simultaneously
<?php class enkripsi { private $kunci1=array('a','b','c','d','e','f','g','h','i','j','k','l','m'); protected $kunci2=array('n','o','p','q','r','s','t','u','v','w','x','y','z'); private function cari($a) { if(in_array($a,$this->kunci1)) { $b=array_search($a,$this->kunci1); return $this->kunci2[$b]; } elseif(in_array($a,$this->kunci2)) { $b=array_search($a,$this->kunci2); return $this->kunci1[$b]; } } public function cetak($a) { echo $this->cari($a); } } $ob=new enkripsi(); $ob->cetak("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.0060.01218.43
8.3.50.0090.00617.95
8.3.40.0120.00318.59
8.3.30.0030.01018.71
8.3.20.0060.00318.77
8.3.10.0050.00321.72
8.3.00.0070.00020.81
8.2.180.0070.01118.54
8.2.170.0090.00622.96
8.2.160.0150.00719.32
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0070.00019.83
8.2.120.0080.00026.35
8.2.110.0060.00320.83
8.2.100.0060.00619.54
8.2.90.0040.00417.88
8.2.80.0050.00317.97
8.2.70.0040.00418.05
8.2.60.0000.00818.22
8.2.50.0040.00418.10
8.2.40.0040.00419.47
8.2.30.0050.00219.37
8.2.20.0030.00518.13
8.2.10.0080.00017.97
8.2.00.0050.00317.65
8.1.280.0070.01425.92
8.1.270.0160.00020.61
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0000.00920.71
8.1.230.0060.00617.82
8.1.220.0030.00517.74
8.1.210.0090.00018.77
8.1.200.0030.00717.23
8.1.190.0040.00417.23
8.1.180.0030.00518.10
8.1.170.0000.00818.65
8.1.160.0040.00418.88
8.1.150.0040.00418.71
8.1.140.0060.00322.14
8.1.130.0000.00720.04
8.1.120.0030.00417.41
8.1.110.0040.00417.30
8.1.100.0040.00417.41
8.1.90.0000.00817.42
8.1.80.0000.00717.40
8.1.70.0000.00817.42
8.1.60.0050.00317.50
8.1.50.0040.00417.41
8.1.40.0040.00417.47
8.1.30.0000.00817.70
8.1.20.0080.00017.70
8.1.10.0020.00517.47
8.1.00.0040.00417.52
8.0.300.0040.00418.77
8.0.290.0030.00616.75
8.0.280.0070.00018.50
8.0.270.0040.00417.25
8.0.260.0030.00318.38
8.0.250.0070.00016.88
8.0.240.0030.00316.97
8.0.230.0060.00316.79
8.0.220.0040.00416.80
8.0.210.0070.00016.77
8.0.200.0000.00816.79
8.0.190.0080.00016.96
8.0.180.0000.00716.89
8.0.170.0060.00316.89
8.0.160.0080.00416.86
8.0.150.0040.00416.73
8.0.140.0000.00716.70
8.0.130.0000.00813.22
8.0.120.0040.00416.74
8.0.110.0030.00616.77
8.0.100.0040.00416.70
8.0.90.0030.00516.86
8.0.80.0100.00516.85
8.0.70.0040.00416.88
8.0.60.0050.00316.90
8.0.50.0000.00716.82
8.0.30.0100.00917.00
8.0.20.0130.01017.40
8.0.10.0000.00716.82
8.0.00.0090.00916.94
7.4.330.0050.00015.55
7.4.320.0070.00016.50
7.4.300.0070.00016.52
7.4.290.0030.00316.58
7.4.280.0040.00416.59
7.4.270.0000.00816.63
7.4.260.0000.00816.57
7.4.250.0050.00316.46
7.4.240.0000.00716.59
7.4.230.0000.00716.36
7.4.220.0000.00716.51
7.4.210.0090.00516.57
7.4.200.0000.00716.68
7.4.160.0090.00816.47
7.4.140.0140.00917.86
7.4.130.0170.00016.66
7.4.120.0050.01316.57
7.4.110.0050.01416.49
7.4.100.0150.00916.45
7.4.90.0000.02616.32
7.4.80.0100.00719.39
7.4.70.0150.00816.40
7.4.60.0060.00916.52
7.4.50.0070.01016.37
7.4.40.0130.00316.28
7.4.10.0070.00714.90
7.4.00.0090.00714.91
7.3.330.0050.00013.26
7.3.320.0030.00313.13
7.3.310.0040.00416.18
7.3.300.0030.00316.16
7.3.290.0020.00516.22
7.3.280.0070.01016.27
7.3.260.0110.00716.44
7.3.240.0110.00616.48
7.3.230.0100.01316.37
7.3.210.0070.01416.63
7.3.200.0080.00816.17
7.3.190.0160.00316.27
7.3.180.0100.00716.31
7.3.170.0100.00716.59
7.3.160.0100.01316.49
7.3.130.0100.01014.80
7.3.120.0080.01014.86
7.3.110.0080.00714.81
7.3.100.0100.00514.79
7.3.90.0040.01014.87
7.3.80.0030.01114.79
7.3.70.0020.01114.79
7.3.60.0050.00714.72
7.3.50.0060.00714.75
7.3.40.0070.00814.59
7.3.30.0020.01014.69
7.3.20.0110.00316.59
7.3.10.0030.01316.71
7.3.00.0060.00816.68
7.2.330.0150.00916.44
7.2.320.0210.00316.72
7.2.310.0030.01316.84
7.2.300.0130.01016.38
7.2.290.0110.00616.48
7.2.260.0130.00715.04
7.2.250.0090.00914.96
7.2.240.0080.00915.02
7.2.230.0090.00814.87
7.2.220.0080.00415.00
7.2.210.0050.00815.12
7.2.200.0070.00714.84
7.2.190.0070.00714.93
7.2.180.0050.01014.98
7.2.170.0050.01214.98
7.2.160.0050.01015.02
7.2.150.0050.01016.73
7.2.140.0070.00716.73
7.2.130.0030.01217.03
7.2.120.0050.01016.94
7.2.110.0120.00715.91
7.2.100.0140.00616.22
7.2.90.0100.00616.03
7.2.80.0090.00815.96
7.2.70.0110.00616.14
7.2.60.0140.00616.21
7.2.50.0060.00916.35
7.2.40.0100.01016.27
7.2.30.0150.00716.22
7.2.20.0130.00916.10
7.2.10.0130.00716.23
7.2.00.0140.00716.36
7.1.330.0090.00615.72
7.1.320.0090.00415.74
7.1.310.0060.00815.72
7.1.300.0060.00815.86
7.1.290.0040.00815.61
7.1.280.0080.00515.63
7.1.270.0050.00915.78
7.1.260.0050.00715.77
7.1.250.0070.00715.75
7.1.240.0060.00615.83
7.1.230.0110.00915.08
7.1.220.0080.00815.00
7.1.210.0090.00815.09
7.1.200.0110.01115.16
7.1.190.0120.00415.08
7.1.180.0130.00215.00
7.1.170.0080.00715.15
7.1.160.0110.00815.02
7.1.150.0120.00715.16
7.1.140.0120.00415.02
7.1.130.0140.00715.12
7.1.120.0100.00815.14
7.1.110.0130.00515.09
7.1.100.0100.00715.10
7.1.90.0270.01215.11
7.1.80.0090.00915.05
7.1.70.0110.01015.12
7.1.60.0190.00721.13
7.1.50.0220.00821.02
7.1.40.0180.01521.14
7.1.30.0180.00621.00
7.1.20.0240.01221.14
7.1.10.0150.00415.17
7.1.00.0110.00815.13
7.0.330.0090.00315.32
7.0.320.0040.00915.38
7.0.310.0050.00815.38
7.0.300.0060.00815.29
7.0.290.0030.01015.21
7.0.280.0040.00815.20
7.0.270.0040.00915.42
7.0.260.0080.00715.32
7.0.250.0060.00415.34
7.0.240.0050.00915.44
7.0.230.0060.00615.42
7.0.220.0080.00715.34
7.0.210.0020.00815.22
7.0.200.0090.00515.21
7.0.190.0080.00815.24
7.0.180.0080.00515.34
7.0.170.0050.00715.29
7.0.160.0070.00715.45
7.0.150.0050.01015.38
7.0.140.0030.01115.34
7.0.130.0080.00615.48
7.0.120.0080.00615.36
7.0.110.0040.01115.27
7.0.100.0020.01115.29
7.0.90.0080.00715.55
7.0.80.0050.00915.49
7.0.70.0030.00815.50
7.0.60.0030.00815.35
7.0.50.0070.00615.60
7.0.40.0060.00813.42
7.0.30.0090.00613.57
7.0.20.0080.00513.37
7.0.10.0060.00413.46
7.0.00.0090.00513.35
5.6.400.0080.00514.06
5.6.390.0050.00714.44
5.6.380.0050.00914.50
5.6.370.0100.00414.63
5.6.360.0040.00614.10
5.6.350.0110.00514.25
5.6.340.0050.00714.31
5.6.330.0060.00714.12
5.6.320.0070.00914.43
5.6.310.0050.01014.64
5.6.300.0050.00814.41
5.6.290.0060.00914.56
5.6.280.0110.00514.46
5.6.270.0030.00714.61
5.6.260.0040.01114.26
5.6.250.0060.01014.38
5.6.240.0030.00914.29
5.6.230.0070.00414.34
5.6.220.0080.00314.44
5.6.210.0100.00314.45
5.6.200.0100.00514.29
5.6.190.0040.00614.52
5.6.180.0040.00614.49
5.6.170.0030.00914.15
5.6.160.0040.00714.19
5.6.150.0050.00514.31
5.6.140.0050.00814.50
5.6.130.0050.00914.42
5.6.120.0080.00714.54
5.6.110.0070.00914.44
5.6.100.0020.01414.36
5.6.90.0060.00414.24
5.6.80.0070.00714.33
5.6.70.0060.00614.36
5.6.60.0050.00714.39
5.6.50.0000.01014.20
5.6.40.0040.00614.23
5.6.30.0060.00414.32
5.6.20.0050.01014.14
5.6.10.0090.00414.32
5.6.00.0060.00814.23

preferences:
46.31 ms | 401 KiB | 5 Q